When calling evaluate on cell with wrong formula e.g. CONCATENATE("a";) (which excel 2010 does not complain about) POI throws exception: java.lang.IllegalArgumentException: Unexpected eval class (org.apache.poi.ss.formula.eval.MissingArgEval) This exception has no information about row/cell. It would be nice if thrown exception contained information about position(row, cell) of wrong formula.
Surely when you call FormulaEvaluator.evaluateFormulaCell(Cell), you have the Cell object to know what the co-ordinates of the problematic formula are?
Sure but first time I was using API I used https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/FormulaEvaluator.html#evaluateAll%28%29 where exception occured. From this exception I had no idea what was wrong, I had to debug POI classes to know what is wrong. If the text of exception was like "Wrong formula in cell BJ58" instead of "Unexpected eval class" it would save me a lot of time. So method evaluateFormulaCell can be used if I want to know positions but I have to iterate sheets, cell, rows -> more code but still it throws "Unexpected eval class".
In older Apache POI version 4.1.2, cell which is having error is highlighted with sheet name whereas in newer version 5.1.2 no error cell is highlighted