[Bug 64420] New: NullPointerException in XSSFReader.SheetIterator.next() if XLSX contains a macrosheet

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 64420] New: NullPointerException in XSSFReader.SheetIterator.next() if XLSX contains a macrosheet

Bugzilla from bugzilla@apache.org
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: [hidden email]
          Reporter: [hidden email]
  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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64420] NullPointerException in XSSFReader.SheetIterator.next() if XLSX contains a macrosheet

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

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

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

Reply | Threaded
Open this post in threaded view
|

[Bug 64420] NullPointerException in XSSFReader.SheetIterator.next() if XLSX contains a macrosheet

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64420

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
         Depends on|                            |50119

--- Comment #1 from Dominik Stadler <[hidden email]> ---
Fixed via r1877814 on trunk now.


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=50119
[Bug 50119] NullPointerException is throw in XSSFReader.SheetIterator.next()
with a  XLSX contains a chartsheet.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]