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 welcome. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
