When we try get error code from the cell with contains formula that returns Error we get exception: java.lang.IllegalStateException: Cannot get a error value from a formula cell at org.apache.poi.xssf.usermodel.XSSFCell.typeMismatch(XSSFCell.java:781) at org.apache.poi.xssf.usermodel.XSSFCell.getErrorCellString(XSSFCell.java:580) at org.apache.poi.xssf.usermodel.XSSFCell.getErrorCellValue(XSSFCell.java:596) It is caused by wrong type identification in method getErrorCellString(). Solution for this problem and simle test see in attachment.
Created attachment 24601 [details] Fix.
Thanks for this, applied to trunk in r884058.