https://bz.apache.org/bugzilla/show_bug.cgi?id=66651

            Bug ID: 66651
           Summary: References to non existing named cells inside Formulas
                    throws exception even with IF/ISERROR
           Product: POI
           Version: 5.2.3-FINAL
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: arieh.kellerm...@profidata.com
  Target Milestone: ---

If there is a reference to a non existent named cell in a formula the following
exception is thrown:
"Specified named range 'NAMEVAR' does not exist in the current workbook."

This is also the case if the name is wrapped inside a "ISERROR" or "IFERROR".

There we would expect the same behavior as in Excel, also even if it is just
inserted I'd expect a Name error in the Cell and not a runtime exception,
essentially the same behavior that is present if a formula is set to divide by
0.

Also there if there is a reference to an non existing sheet or external
workbook then one can use:
>FormulaEvaluator#setIgnoreMissingWorkbooks()
to get Excels behavior, but named cells will still fail.

Code to reproduce:
>Workbook workbook = new XSSFWorkbook();
>Cell cell = workbook.createSheet().createRow(0).createCell(0);
>cell.setCellFormula("ISERROR(NAMEVAR)");

-- 
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

Reply via email to