调用
//刷新引用的表格的数据
HSSFFormulaEvaluator.evaluateAllFormulaCells(wb);
后报错:org.apache.poi.ss.formula.eval.NotImplementedException: Error evaluating cell
Caused by: org.apache.poi.ss.formula.eval.NotImplementedException: Error evaluating cell data!J8
at org.apache.poi.ss.formula.WorkbookEvaluator.addExceptionInfo(WorkbookEvaluator.java:356)
at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:297)
at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:653)
at org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:51)
at org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:44)
at org.apache.poi.ss.formula.eval.OperandResolver.getSingleValue(OperandResolver.java:62)
at org.apache.poi.ss.formula.WorkbookEvaluator.dereferenceResult(WorkbookEvaluator.java:543)
at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:506)
at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:287)
... 42 more
Caused by: org.apache.poi.ss.formula.eval.NotImplementedException: AVERAGEA

解决方案 »

  1.   

    This document is for developers wishing to contribute to the FormulaEvaluator API functionality.When evaluating workbooks you may encounter a org.apache.poi.ss.formula.eval.NotImplementedException which indicates that a function is not (yet) supported by POI. Is there a workaround? Yes, the POI framework makes it easy to add implementation of new functions. Prior to POI-3.8 you had to checkout the source code from svn and make a custom build with your function implementation. Since POI-3.8 you can register new functions in run-time.Currently, contribution is desired for implementing the standard MS excel functions. Place holder classes for these have been created, contributors only need to insert implementation for the individual "evaluate()" methods that do the actual evaluation.http://poi.apache.org/spreadsheet/eval-devguide.html