https://bz.apache.org/bugzilla/show_bug.cgi?id=60848
--- Comment #2 from mewa...@gmail.com --- It's as simple as evaluating a sumproduct whose first arg starts with --. --- Sample files --- bad.xlsx: in A3, set formula to =SUMPRODUCT(--(B5:B20)) --- Test results --- Running the sample code below, you will get: java sampleApp good.xlsx <prints "No error"> java sampleApp bad.xlsx <prints "Invalid arg type for SUMPRODUCT:(org.apache.poi.ss.formula.eval.ErrorEval)"> --- Sample code --- private static final String FILE_NAME = "test.xlsx"; public static void main(String[] args) { try { FileInputStream excelFile = new FileInputStream(new File(FILE_NAME)); Workbook workbook = new XSSFWorkbook(excelFile); // get the cell with the offending formula (cell A3 in sheet 0) Cell c = workbook.getSheetAt(0).getRow(2).getCell(0); FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator(); evaluator.evaluateFormulaCell(c); System.out.println("No error"); } catch(Exception e) { System.out.println("There was an error"); System.out.println(e.getMessage()); } } -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org