Bug 56443 - NullPointerException on HSSFRow.getLastRowNum()
Summary: NullPointerException on HSSFRow.getLastRowNum()
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-22 13:18 UTC by Lionel
Modified: 2014-04-22 15:48 UTC (History)
0 users



Attachments
Java Class and Excel file to run the bug. (374.16 KB, application/zip)
2014-04-22 13:18 UTC, Lionel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel 2014-04-22 13:18:18 UTC
Created attachment 31545 [details]
Java Class and Excel file to run the bug.

On some of my Excel files, POI throws a NulPointerException on HSSFRow.getLastRowNum() method.

I have made a synthetic Excel file and a sunthetic Java class, which are in the attachment, to present this bug.
Comment 1 Nick Burch 2014-04-22 15:15:57 UTC
Have you checked that the row isn't null? Sheet.getRow(int) can return null if the row has never been used or styled
Comment 2 Lionel 2014-04-22 15:47:41 UTC
Ok, I'm sorry : you're right, I didn't think the row befor the last row could be null.

Thank you :-).

Lionel