Andrew, it looks like you are missing a closing parenthesis in that equation. Try "IF(ISBLANK(C2);0;IF(ISBLANK(L5);0;L5*C2))".

Chris

Danny Mui wrote:
It would be most helpful if you can enter this into bugzilla, with a junit testcase.

thanks

Andrew Kharchuk wrote:

When I'm trying to set the following formula value
"IF(ISBLANK(C2);0;IF(ISBLANK(L5);0;L5*C2)" I get an Exception. What is
wrong?

java.lang.RuntimeException: Cannot Parse, sorry : Integer 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.GetNum(FormulaParser.java:239)
at org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java:479)
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:453)
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)



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to