https://issues.apache.org/bugzilla/show_bug.cgi?id=47245
--- Comment #12 from Triqui <[email protected]> --- Created attachment 31927 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31927&action=edit Problematic file to test This file contains the bug, but runs properly with BiffViewer. What I found after debugging is that in HSSFSheet.setPropertiesFromSheet there is a line where it looks for the row 149 and the file contains 149 RowRecords. This line: hrow = getRow(cval.getRow()); cval is the CellIterator. The first problematic cval is a LabelSSTRecord with row number 149. >From the javadoc: HSSFRow org.apache.poi.hssf.usermodel.HSSFSheet.getRow(int rowIndex) Returns the logical row (not physical) 0-based. If you ask for a row that is not defined you get a null. This is to say row 4 represents the fifth row on a sheet. So, since there are only 149 RowRecords, and getRow(149) represents the 150th row on the sheet, which doesn't exists, then hrow becomes null and then the exception is thrown. Maybe it's as easy as changing that line to: hrow = getRow(cval.getRow() - 1); [LABELSST] .row = 0x0095 .col = 0x0002 .xfindex= 0x0045 .sstIndex = 0x0053 [/LABELSST] -- 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]
