Bug 35027 - FormulaParser cannot parse cross sheet references with underscores
Summary: FormulaParser cannot parse cross sheet references with underscores
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-23 19:21 UTC by Tobias Haubner
Modified: 2005-05-31 13:13 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Haubner 2005-05-23 19:21:27 UTC
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 == '_';
Comment 1 Avik Sengupta 2005-05-31 21:13:15 UTC
Fixed, thanks Tobias. 

Please verify.