You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Mark Beardsley <ma...@tiscali.co.uk> on 2011/01/23 10:08:27 UTC

Re: TypeMismatch error with HSSFFormulaEvaluator.evaluateInCell

Without nowing a lot more about the workbook in question, I can only
speculate. Currently, I am thinking that it may be you are falling foul of
POI's dynamic cell typing mechanism - that is assuming it even works when
formulae are being evaluated. It may - and that is a big may - be that the
destination cell has been set to receive a text value, that the source cell
contains a number declared to be a text value but in recovering that value
from the source cell, POI recognises that it is anumber and complains about
not being able to write it into a non-numeric cell.

One quick solution to try would be to explicitly tell the formula evaluator
that you want the number as text, as a String and I think that you would
need to embed the cell reference into a TEXT function declaration, something
like this =TEXT('Sheet 1'!A1, "#,##0.00"). Do not know if that will work but
it should be a very quick test tpo run - just modify the contents of one of
the cells that it currently reporting an error.

Yours

Mark B
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/please-help-with-java-lang-VerifyError-tp3351905p3353468.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: TypeMismatch error with HSSFFormulaEvaluator.evaluateInCell

Posted by "rahul.ratnakar" <ra...@tavant.com>.
Thanks Mark! didnt realize I had sent a reply to one of the posts and was
wondering why there was no response to my question. So in fact I created one
new request just now and then saw your post .... whew. 

But I will try your suggestion. 
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/please-help-with-java-lang-VerifyError-tp3351905p3353686.html
Sent from the POI - User mailing list archive at Nabble.com.

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