Bug 49640

Summary: [PATCH] FormulaParser cannot parse formulas containing defined names beginning with an underscore
Product: POI Reporter: David Lewis <DLewis400>
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.7-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Fixes incorrect rejection of defined names beginning with underscores in formulas

Description David Lewis 2010-07-22 17:31:31 UTC
Created attachment 25795 [details]
Fixes incorrect rejection of defined names beginning with underscores in formulas

Eclipse allows defined names to begin with either a letter or an underscore.  These defined names may be present in a formula (e.g. =SUM(F15:F16)+_GP108).  In the previous example _GP108 is a defined name beginning with an underscore.  

FormulaParser fails to process the defined name in the previous example because the parseNonRange(int) function only tests whether the defined name begins with a letter.  This occurs when processing xssf workbooks only.

The attached patch modifies the test for the defined name starting character to accept underscores.
Comment 1 Yegor Kozlov 2010-07-26 11:53:56 UTC
Applied in r979329

Yegor