Bug 46951

Summary: Cannot parse range expressions with non-cell ref operands
Product: POI Reporter: Josh Micich <josh>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P5    
Version: 3.5-dev   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Josh Micich 2009-04-01 12:26:36 UTC
The following code:
cell.setCellFormula("SUM(C1:OFFSET(C1,0,B1))");

fails with this exception:
org.apache.poi.ss.formula.FormulaParser$FormulaParseException: Specified named range 'OFFSET' does not exist in the current workbook.


This bug was noticed while fixing bug 46948 , which is concerned about evaluation of the corresponding Ptg array (pre-parsed by Excel).
Comment 1 Josh Micich 2009-04-06 01:45:47 UTC
This turned out to be a much bigger change than expected.  Expressions like "A!A1:A!B2" are not easily handled by recursive descent parsing.

Fixed in svn r762250

Several junits added