Bug 42448 - Can't parse SUMPRODUCT(A!C7:A!C67, B8:B68) / B69
Summary: Can't parse SUMPRODUCT(A!C7:A!C67, B8:B68) / B69
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.5-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-17 13:20 UTC by bob.wilber
Modified: 2008-05-17 06:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bob.wilber 2007-05-17 13:20:07 UTC
HSSFCell.setCellFormula() crashes with the following string:

"SUMPRODUCT(A!C7:A!C67, B8:B68) / B69"

(I had previously created a worksheet with the name "A", and was creating
this formula in a different worksheet.)

Excel is perfectly happy with htis formula when I type it in by hand.

The relevant part of the stack dump is:

at java.lang.String.charAt(String.java:687)
	at org.apache.poi.hssf.util.CellReference.<init>(CellReference.java:44)
	at org.apache.poi.hssf.util.AreaReference.<init>(AreaReference.java:33)
	at org.apache.poi.hssf.record.formula.Area3DPtg.setArea
(Area3DPtg.java:243)
	at org.apache.poi.hssf.record.formula.Area3DPtg.<init>
(Area3DPtg.java:58)
	at org.apache.poi.hssf.model.FormulaParser.Ident(FormulaParser.java:280)
	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.Arguments
(FormulaParser.java:443)
	at org.apache.poi.hssf.model.FormulaParser.function
(FormulaParser.java:315)
	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)
Comment 1 Yegor Kozlov 2008-05-17 06:05:50 UTC
Works with poi-3.1-beta2

Yegor