Hello Steve, Thanks for your investigation with multiple workbook evaluation. I didn't realise that your defined-name was in the *other* workbook. POI currently supports evaluation cross-workbook references involving defined-names but only if they are defined in the workbook containing the cell under evaluation. Your first example shows the unsupported case. This functionality needs to be fixed (it shouldn't make any difference which book has the defined name). The solution probably involves the class WorkbookEvaluator, calling methods getOtherWorkbookEvaluator(), and some variation of evaluateNameFormula().
Assuming that the other workbook is available, direct evaluation would be preferred over reading cached values (from CRNRecords or wherever). This is because (for the most part) the POI evaluator supports evaluating cells after input values have been modified. It would be inconsistent to handle external names differently. If you want to pursue the CRNRecord route, we might be able to make an API for accessing those values (similar to reading/setting cached cell formula results). The formula evaluator could optionally use the cached values when the external workbook is unavailable. regards, Josh --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
