Bug 31044

Summary: Parsing error setting formulas referencing other sheets
Product: POI Reporter: Bhavik Merchant <bhavik>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 2.5-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description Bhavik Merchant 2004-09-03 14:52:29 UTC
Tried to set formulas such as:

MIN('WEEK 1'!F9:'WEEK 1'!F15)

or

SUM('WEEK 1'!F9:'WEEK 1'!F15)

 
The FormulaParser is throwing me this:

 

java.lang.RuntimeException: Cannot Parse, sorry : ) Expected
 

at org.apache.poi.hssf.model.FormulaParser.Abort(FormulaParser.java:117)
        at org.apache.poi.hssf.model.FormulaParser.Expected(FormulaParser.java:124)
        at org.apache.poi.hssf.model.FormulaParser.Match(FormulaParser.java:184)
        at org.apache.poi.hssf.model.FormulaParser.function(FormulaParser.java:316)
        at org.apache.poi.hssf.model.FormulaParser.Ident(FormulaParser.java:265)
        at org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java:474)
        at org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java:548)
        at
org.apache.poi.hssf.model.FormulaParser.Expression(FormulaParser.java:596)
        at org.apache.poi.hssf.model.FormulaParser.parse(FormulaParser.java:700)
        at org.apache.poi.hssf.usermodel.HSSFCell.setCellFormula(HSSFCell.java:678)


The formulas work fine if entered into the cell from within Excel itself.

Also i noticed the MIN formula will work if you provide an argument list rather
than a range of cells. So i believe the range argument is causing the problem.
Comment 1 Jason Height 2006-08-28 12:16:51 UTC
Fixed in SVN. 

Jason