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

            Bug ID: 60459
           Summary: Null pointer exception in
                    ExternSheetNameResolver.prependSheetName method
           Product: POI
           Version: 3.15-FINAL
          Hardware: Macintosh
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 34510
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34510&action=edit
test file

I'm parsing Excel file from EUSES data set. When get formula of name 'Database'
with range ='file:///HEPPC3/gt$/Teaching/Syn/[physyn.xls]#REF'!$AK$70:$AL$70

It throw null pointer exception:
...
for(Name rangedName : wb.getAllNames())
  if (!rangedName.isFunctionName()) {
    xlWorkbook.addNamedRange(rangedName.getNameName(),
rangedName.getRefersToFormula());
}
...


Exception in thread "main" java.lang.NullPointerException
        at
org.apache.poi.ss.formula.ptg.ExternSheetNameResolver.prependSheetName(ExternSheetNameResolver.java:40)
        at
org.apache.poi.ss.formula.ptg.Area3DPtg.toFormulaString(Area3DPtg.java:104)
        at
org.apache.poi.ss.formula.FormulaRenderer.toFormulaString(FormulaRenderer.java:91)
        at
org.apache.poi.hssf.model.HSSFFormulaParser.toFormulaString(HSSFFormulaParser.java:119)
        at
org.apache.poi.hssf.usermodel.HSSFName.getRefersToFormula(HSSFName.java:204)


Sheetname is null. I guess sheet name is #REF error in Excel. Should it return
#REF or the index of sheet?

Attached file is test file to replicate the issues.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to