i create a workbook and want to evaluate all formulas:
Workbook wbTemp = new HSSFWorkbook(inp);
//do workbook stuff here
wbTemp.getCreationHelper().createFormulaEvaluator().evaluateAll();
i get this error:
The method evaluateAll() is undefined for the type FormulaEvaluator
when it clearly says here that evaluateAll is an existing method. what might be causing this?
You almost certainly have two copies of POI on your classpath. One is the new, latest version which contains the feature you want to use. The other is an older version that doesn’t, and it seems your system is preferring the older one…
This is a common enough problem that the POI FAQ Covers this very case. Ideally, just look at your classpath, and try to identify the extra older POI jar. However, if that doesn’t work, try this snippet of code from the POI FAQ:
That will print out the filename of the POI jar you’re using, so you can work out where the older copy is coming from and remove it!