poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dimitri Pissarenko <dimitri.pissare...@gmx.net>
Subject HSSF, Problem with a formula
Date Sat, 15 Nov 2003 14:11:10 GMT
Hello!

I'm writing an application, in which I create an Excel document with
several worksheets. These show different values and their sums. I want
to create an additional worksheet, where only sums of those values are
shown.

For this purpose, I created this new worksheet and tried to set a
formula in a cell, which "points" exactly to the sum row of the
original worksheet.

The formula is

'Profile B'!N79-'Profile B'!N132

ie, the difference between cell N79 in worksheet "Profile B" and cell
N132 in worksheet "Profile B".

If I enter this formula manually in an Excel document, it works.

But POI generates following error message

2003-11-15 14:59:34,642 ERROR [profile.bsh] - 
java.lang.RuntimeException: Cannot Parse, sorry : Integer Expected
	at
org.apache.poi.hssf.model.FormulaParser.Abort(FormulaParser.java:172)
	at
org.apache.poi.hssf.model.FormulaParser.Expected(FormulaParser.java:179)
	at
org.apache.poi.hssf.model.FormulaParser.GetNum(FormulaParser.java:276)
	at
org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java:506)
	at
org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java:545)
	at
org.apache.poi.hssf.model.FormulaParser.Expression(FormulaParser.java:596)
	at
org.apache.poi.hssf.model.FormulaParser.parse(FormulaParser.java:636)
	at
org.apache.poi.hssf.usermodel.HSSFCell.setCellFormula(HSSFCell.java:714)
...

Does someone know, how to solve this problem?

TIA

Dimitri Pissarenko

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Mime
View raw message