Bug 44987 - getLastCellNum of HSSFRow returns the wrong value
Summary: getLastCellNum of HSSFRow returns the wrong value
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2008-05-13 06:02 UTC by Martin Allerstorfer
Modified: 2008-05-13 08:26 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Allerstorfer 2008-05-13 06:02:36 UTC
The method getLastCellNum of class HSSFRow does not return the index of the last cell contained in this row as described in the documentation but it returns the last index of the row with most cells. If this is wanted so please change the documentation.
Comment 1 Josh Micich 2008-05-13 08:26:58 UTC
There's no mistake in the javadoc for HSSFRow.getLastCellNum() (see bug 43901).  So if there is a discrepancy, it's a real bug.

From what I understand, you are saying that presence of cells in one row can affect the LastCellNum value of another row.  POI didn't seem to have any test case which made sure this doesn't occur, this so I added one (in svn r655912).

Can you please upload a spreadsheet and/or some test code which shows the behaviour you are referring to?