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

            Bug ID: 64420
           Summary: NullPointerException in
                    XSSFReader.SheetIterator.next() if XLSX contains a
                    macrosheet
           Product: POI
           Version: 4.1.2-FINAL
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 37224
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37224&action=edit
xlsm file containing a macrosheet that reproduces the problem

This is almost a duplicate of the fixed bug 50119 except that my xlsm contains
a macro sheet. The same analysis as in 50119 applies here.

In the constructor of XSSFReader.SheetIterator only worksheets and chartsheets
are added to the sheetMap. The macro sheet
(http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet) is not
added to the sheetMap. But the iterator iterates over all valid IDs, including
the macro sheet. Since the sheetMap doesn't contain the macro sheet this call
in SheetIterator.next()

           return sheetPkg.getInputStream();

(org.apache.poi.xssf.eventusermodel.XSSFReader.SheetIterator, line 313)   

throws a NullPointer.

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