Bug 55605 - NullPointerException during iteration over CTSheets
Summary: NullPointerException during iteration over CTSheets
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.8-FINAL
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
Keywords: PatchAvailable
Depends on:
Reported: 2013-09-27 18:10 UTC by Diego Gutierrez
Modified: 2016-04-07 21:04 UTC (History)
0 users

Proposed solution to this issue (1.48 KB, patch)
2013-09-27 18:10 UTC, Diego Gutierrez
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Gutierrez 2013-09-27 18:10:57 UTC
Created attachment 30891 [details]
Proposed solution to this issue

The problem ocurrs during iteration over CTSheets, in class SheetIterator with a excel file with macros.

The null pointer exception is thrown when next() function is called.

In next() function:

It seems  that 


returns a null or blank value so when  


is called, it returns null value which causes the Null Pointer Exception in this line:

  return sheetPkg.getInputStream();

Comment 1 Dominik Stadler 2015-09-13 14:44:53 UTC
There does not seem to be any file in the large suite of test-files in the POI source-code which triggers this, can you apply a sample file so we can actually reproduce this?
Comment 2 Dominik Stadler 2016-04-07 21:04:07 UTC
If the problem still exists in the latest version, then please reopen this if you can attach a file that works in Excel but fails in POI so we can reproduce the problem.