DO NOT REPLY [Bug 35027] New: - FormulaParser cannot parse cross sheet references with underscores

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

DO NOT REPLY [Bug 35027] New: - FormulaParser cannot parse cross sheet references with underscores

Bugzilla from bugzilla@apache.org
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG?
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND?
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35027

           Summary: FormulaParser cannot parse cross sheet references with
                    underscores
           Product: POI
           Version: 3.0-dev
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Excel allows cross sheet references with underscores without having to escape
the sheet name: e.g: =Cash_Flow!A1
POI's FormulaParser however cannot handle such references because an underscore
is not a character letter and isAlpha(char c) returns false.

Solution could be to change the method isAlpha(char c) in
org.apache.poi.hssf.model.FormulaParser from

return Character.isLetter(c) || c == '$';

to

return Character.isLetter(c) || c == '$' || c == '_';

--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/