Created attachment 31306 [details] add support to ignore missing workbooks on formula evaluation Currently formula evaluation with external references throw a RuntimeException (not implemented yet XSSFEvaluationWorkbook:128) but I'd like POI to use the cached value in this case. HSSFFormulaEvaluator already provides setIgnoreMissingWorkbooks(boolean ignore). The attached patch adds this functionality to the XSSFFormulaEvaluator.
I'd much rather someone implemented the external references support in XSSF, rather than just hiding the problem!
Andre and I would ideally like to implement external references support too, as we're currently doing this at the application level in an incomplete way. If we do, then we'll certainly submit another patch. For now, this patch replicates the HSSF functionality to ignore external references, which is simpler than ForkedEvaluator for developers who are happy to ignore external references but still want to evaluate local cells. The previous behaviour is a runtime exception of "not implemented yet" with no easy workaround, so this is an improvement.
There is now some XSSF Formula support for external references in trunk Any chance you could review that, then either make some changes to your patch if needed, or comment that no further changes are needed if the patch is fine as-is?
As of r1614729, FormulaEvaluator now has the setIgnoreMissingWorkbooks method, and XSSF uses it. Unit tests added based on the existing HSSF case, by switching in a different base workbook to evaluate against