poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Micich <josh.mic...@gmail.com>
Subject Re: Errors using INDIRECT() ? (POI v.3.5-FINAL & 3.6)
Date Mon, 04 Jan 2010 20:53:12 GMT
You also mentioned that JExcelAPI works OK for reading this same data.
 As far as I know, JExcelAPI does not support formula evaluation, so I
assume you must mean "reading the cached formula result".  POI can
also do this (without need of any formula evaluation).  Just use
Cell.getCachedFormulaResultType() to find the type of the data
returned by the formula, and Cell.get~CellValue() to retrieve the
cached result.  In the current example AVERAGE returns a numeric type
so you should use Cell.getNumericCellValue().

On the other hand if reading the cached formula result is not good
enough, you will need to get an implementation for the missing
function that caused the NotImplementedException.  In this case, I
suspect it is ADDRESS. Your description is missing the exception
message   (e.g. "FuncIx=219"), but I am pretty sure the problem is not
with INDIRECT because this has been implemented since version 3.5.

So POI doesn't implement ADDRESS yet.  Perhaps this function is not in
high demand because there are simpler alternatives.  For example, your
formula could be described more easily using OFFSET instead:
"AVERAGE(OFFSET(Q24, 0,0, 1-Invoer!B$12, 1))".  There might be good
reasons why you can't make this simplification (e.g. it's not your
spreadsheet, too many occurrences, or the example already had some
simplifications which are not compatible with this change).  If you
really need for POI to be able to evaluate ADDRESS please feel free to
supply a patch with a simple unit test.  Contributions are always

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

View raw message