Bug 31044 - Parsing error setting formulas referencing other sheets
Summary: Parsing error setting formulas referencing other sheets
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.5-FINAL
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-03 14:52 UTC by Bhavik Merchant
Modified: 2006-08-28 05:16 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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