You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by pielmw <pi...@hotmail.com> on 2014/08/12 21:34:23 UTC

getCachedFormulaResultType() Fails if cell is using EOMONTH()

I am having a issue when reading .xls user files that have a cell that is
using the Excel function EOMONTH(). when I try to
getCachedFormulaResultType() on the cell it Cell.CELL_TYPE_ERROR.  But if I
save-as the files with the .xlsx the process works fine.  Is there a
different function in the FormulaEvaluator class that should be used for
.xls files?



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/getCachedFormulaResultType-Fails-if-cell-is-using-EOMONTH-tp5716313.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: getCachedFormulaResultType() Fails if cell is using EOMONTH()

Posted by Nick Burch <ap...@gagravarr.org>.
On Tue, 12 Aug 2014, pielmw wrote:
> I am having a issue when reading .xls user files that have a cell that 
> is using the Excel function EOMONTH(). when I try to 
> getCachedFormulaResultType() on the cell it Cell.CELL_TYPE_ERROR.

getCachedFormulaResultType() returns whatever Excel last decided to store 
in the File. Nothing we can do if Excel decided to write something 
unhelpful in there, sorry. (Try Microsoft, assuming you have a suitable 
support contract...)

> Is there a different function in the FormulaEvaluator class that should 
> be used for .xls files?

If you evaluate the cell with FormulaEvaluator, then after that 
getCachedFormulaResultType() should return the right type. Until then, 
it'll only give you what Excel last decided to write

Nick

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