Created attachment 24842 [details] xlsx that generate the error Caused by: java.lang.RuntimeException: Not implemented yet at org.apache.poi.xssf.usermodel.XSSFEvaluationWorkbook.getNameXPtg(XSSFEvaluationWorkbook.java:93) at org.apache.poi.ss.formula.FormulaParser.function(FormulaParser.java:930) at org.apache.poi.ss.formula.FormulaParser.parseNonRange(FormulaParser.java:570) at org.apache.poi.ss.formula.FormulaParser.parseRangeable(FormulaParser.java:442) at org.apache.poi.ss.formula.FormulaParser.parseRangeExpression(FormulaParser.java:285) at org.apache.poi.ss.formula.FormulaParser.parseSimpleFactor(FormulaParser.java:1131) at org.apache.poi.ss.formula.FormulaParser.percentFactor(FormulaParser.java:1091) at org.apache.poi.ss.formula.FormulaParser.powerFactor(FormulaParser.java:1078) at org.apache.poi.ss.formula.FormulaParser.Term(FormulaParser.java:1400) at org.apache.poi.ss.formula.FormulaParser.additiveExpression(FormulaParser.java:1500) at org.apache.poi.ss.formula.FormulaParser.concatExpression(FormulaParser.java:1484) at org.apache.poi.ss.formula.FormulaParser.comparisonExpression(FormulaParser.java:1441) at org.apache.poi.ss.formula.FormulaParser.Arguments(FormulaParser.java:1063) at org.apache.poi.ss.formula.FormulaParser.function(FormulaParser.java:948) at org.apache.poi.ss.formula.FormulaParser.parseNonRange(FormulaParser.java:570) at org.apache.poi.ss.formula.FormulaParser.parseRangeable(FormulaParser.java:530) at org.apache.poi.ss.formula.FormulaParser.parseRangeExpression(FormulaParser.java:285) at org.apache.poi.ss.formula.FormulaParser.parseSimpleFactor(FormulaParser.java:1131) at org.apache.poi.ss.formula.FormulaParser.percentFactor(FormulaParser.java:1091) at org.apache.poi.ss.formula.FormulaParser.powerFactor(FormulaParser.java:1078) at org.apache.poi.ss.formula.FormulaParser.Term(FormulaParser.java:1400) at org.apache.poi.ss.formula.FormulaParser.additiveExpression(FormulaParser.java:1500) at org.apache.poi.ss.formula.FormulaParser.concatExpression(FormulaParser.java:1484) at org.apache.poi.ss.formula.FormulaParser.comparisonExpression(FormulaParser.java:1441) at org.apache.poi.ss.formula.FormulaParser.unionExpression(FormulaParser.java:1421) at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:1542) at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:193) at org.apache.poi.xssf.usermodel.XSSFEvaluationWorkbook.getFormulaTokens(XSSFEvaluationWorkbook.java:134) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:255) at org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:203) at org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator.evaluateFormulaCellValue(XSSFFormulaEvaluator.java:252) at org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator.evaluateFormulaCell(XSSFFormulaEvaluator.java:145) at org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator.evaluateAllFormulaCells(XSSFFormulaEvaluator.java:242) ... 12 more
Same file produces following error in 3.6 ------ Exception in thread "Thread-5" java.lang.NoClassDefFoundError: Could not initialize class org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxfs at org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxfs$Factory.newInstance(Unknown Source) at org.apache.poi.xssf.model.StylesTable.writeTo(StylesTable.java:362) at org.apache.poi.xssf.model.StylesTable.commit(StylesTable.java:377) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:177) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:181) at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:214)
When you got the class not found exception, were you using the full ooxml schemas jar, or just the poi-ooxml-schemas small one? If the latter, please re-try with the full one. If that helps, we'll need a unit test that uses the class in question, so that the "what should I put in the small jar" processor knows that things use it!
I used poi-ooxml-schemas-3.6-20091214.jar and the other jars downloaded with 3.6. Switching back to using the 3.5FINAL, the class is there. I might have some time to look at this problem and others I encountered. What is the best place to start. Most of the problems I have is related to the newer xlsx format.
I can confirm that this problem is still present in head The problem formula seems to be: IF(B6= (ROUNDUP(B6,0) + ROUNDDOWN(B6,0))/2, MROUND(B6,2),ROUND(B6,0)) I have added a disabled unit test to TestXSSFBugs for this, which can be enabled once the bug is fixed Josh - probably one for you though, as it seems to be quite deep in the bowels of the XSSF Formula Evaluator that it's failing
POI prior to 3.8-alpha did not support evaluation of functions from the Excel Analysis Toolpack (ATP). The ATP functions are now supported and evaluation of the entire workbook completes with two errors: Not Implemented: MROUND Not Implemented: VAR Yegor
MROUND and VAR were added in r1044642. Now the attached workbook evaluates OK. Try the latest build from trunk. Daily builds can be downloaded form here: http://encore.torchbox.com/poi-cvs-build/ Yegor