I have a template XLS file that I load with Apache POI and write loads of data in it, then save it as another file. I have formulas in my XLS file like this:
=SUMPRODUCT((DS!B:B="IN_THIS_ONLY")*(DS!D:D="New trade"))
also tried
=SUMPRODUCT(0+(DS!B:B="IN_THIS_ONLY"),0+(DS!D:D="New trade"))
these evaluate correctly if I press Enter on the cell in Excel. However, simply calling
HSSFFormulaEvaluator.evaluateAllFormulaCells(workbook);
does not seem to evaluate them, neither does pressing on the "Calculate now" button in Excel - so I guess this is a special formula or function.
The other, more conventional COUNTIF
s and SUMIF
s work fine, however these do not allow multiple conditions to be specified.
POI does not support array formulas.
Is there any way to make these work. I'm using POI version 3.7.