-
Bug
-
Resolution: Fixed
-
Normal
-
5.8.1
-
None
-
Security Level: Jimmy
-
None
-
None
Steps to Reproduce
1. import the file
Current Result
java.lang.NullPointerException
at org.zkoss.poi.ss.formula.functions.Sumifs.sumMatchingCells(Sumifs.java:116)
at org.zkoss.poi.ss.formula.functions.Sumifs.evaluate(Sumifs.java:68)
at org.zkoss.poi.ss.formula.UserDefinedFunction.evaluate(UserDefinedFunction.java:67)
at org.zkoss.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:171)
at org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:664)
at org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:375)
at org.zkoss.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:302)
at io.keikai.model.impl.sys.formula.FormulaEngineImpl.evaluateFormula(FormulaEngineImpl.java:587)
at io.keikai.model.impl.sys.formula.FormulaEngineImpl.evaluate(FormulaEngineImpl.java:467)
at io.keikai.model.impl.CellImpl.evalFormula(CellImpl.java:201)
at io.keikai.model.impl.CellImpl.getFormulaResultType(CellImpl.java:225)
at io.keikai.ui.SpreadsheetCtrlImpl.getCellAttr(SpreadsheetCtrlImpl.java:495)
at io.keikai.ui.SpreadsheetCtrlImpl.getRangeAttrs(SpreadsheetCtrlImpl.java:382)
at io.keikai.ui.Spreadsheet.createActiveRange(Spreadsheet.java:1977)
at io.keikai.ui.Spreadsheet.renderProperties(Spreadsheet.java:1930)
at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:2180)
Expected Result
no error
Debug Information
- =SUMIFS(A2:A9, B2:B9, D2) at E2, D2 is a blank cell. using a blank cell as a criterion causes this error.
Workaround
- add a null check