poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avik Sengupta <avik.sengu...@itellix.com>
Subject Re: Formula Evaluator fails on #REF instead of number
Date Fri, 30 Mar 2007 05:23:08 GMT
formula's with #REF! in them wouldnt work. It should be possible to put in a 
validator somewhere early in the stack to throw a better looking error.

On Friday 30 Mar 2007 1:56:20 am Karr, David wrote:
> Using 3.0rc2, the formula evaluator failed on a particular cell, with
> the stacktrace following this.  Before I file an issue for this, is this
> expected to fail this way?  Is there any workaround I can implement?
>
> Error: Integer Expected
> java.lang.RuntimeException: Cannot Parse, sorry : Integer Expected @ 28
> [Formula String was:
> 'IF(D37=0,0,IF(AND(ISNUMBER(#REF!),ISNUMBER(D37)),#REF!/D37*100,0))']
> 	at
> org.apache.poi.hssf.model.FormulaParser.Abort(FormulaParser.java:114)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Expected(FormulaParser.java:121)
> 	at
> org.apache.poi.hssf.model.FormulaParser.GetNum(FormulaParser.java:255)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java:512)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java:606)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Expression(FormulaParser.java:65
> 4)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Arguments(FormulaParser.java:469
> )
> 	at
> org.apache.poi.hssf.model.FormulaParser.function(FormulaParser.java:341)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Ident(FormulaParser.java:280)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java:505)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java:606)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Expression(FormulaParser.java:65
> 4)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Arguments(FormulaParser.java:469
> )
> 	at
> org.apache.poi.hssf.model.FormulaParser.function(FormulaParser.java:341)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Ident(FormulaParser.java:280)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java:505)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java:606)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Expression(FormulaParser.java:65
> 4)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Arguments(FormulaParser.java:469
> )
> 	at
> org.apache.poi.hssf.model.FormulaParser.function(FormulaParser.java:341)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Ident(FormulaParser.java:280)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java:505)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java:606)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Expression(FormulaParser.java:65
> 4)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Arguments(FormulaParser.java:479
> )
> 	at
> org.apache.poi.hssf.model.FormulaParser.function(FormulaParser.java:341)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Ident(FormulaParser.java:280)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Factor(FormulaParser.java:505)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Term(FormulaParser.java:606)
> 	at
> org.apache.poi.hssf.model.FormulaParser.Expression(FormulaParser.java:65
> 4)
> 	at
> org.apache.poi.hssf.model.FormulaParser.parse(FormulaParser.java:758)
> 	at
> org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.internalEvaluate(HSSF
> FormulaEvaluator.java:296)
> 	at
> org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluate(HSSFFormulaE
> valuator.java:192)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Mime
View raw message