简体   繁体   中英

Java apache poi error: java.lang.IllegalArgumentException: Unknown error type: -60

I'm getting error java.lang.IllegalArgumentException: Unknown error type: -60 , in following code:

...

evaluator.evaluateFormulaCell(c);

...

In excel file, all formulas works fine.

Stacktrace:

java.lang.IllegalArgumentException: Unknown error type: -60
at org.apache.poi.ss.usermodel.FormulaError.forInt(FormulaError.java:131)
at org.apache.poi.xssf.usermodel.XSSFCell.setCellErrorValue(XSSFCell.java:611)
at org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator.setCellValue(XSSFFormulaEvaluator.java:203)
at org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator.evaluateFormulaCell(XSSFFormulaEvaluator.java:147)

...

You need to upgrade to a newer version of Apache POI.

Specifically, you need to be running POI 3.12 beta 1 or newer. If you look at the changelog for Apache POI , you'll see that this bug was fixed between 3.11 final and 3.12 beta 1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM