poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murphy, Mark" <murphym...@metalexmfg.com>
Subject RE: Difference of getLastRowNum() and getPhysicalNumberOfRows()
Date Wed, 01 Jun 2016 10:48:32 GMT
getLastRowNum() retrieves the index of the last row in a spreadsheet. These indexes are 0 based,
and if you have no missing rows, row 1104 the last row will have index 1103. getPhysicalNumberOfRows()
returns the number of rows actually used in the spreadsheet. Unused rows are just missing
from the spreadsheet. So you could have a situation where you only have one row at row 1104.
In that case getPhysicalNumberOfRows() would return 1, but getLastRowNum() would return 1103.

-----Original Message-----
From: Michael [mailto:michael.a@electronicscience.com] 
Sent: Wednesday, June 01, 2016 2:50 AM
To: POI Users List
Subject: Difference of getLastRowNum() and getPhysicalNumberOfRows()

Hi All,

Would like to ask the difference between getLastRowNum() and
getPhysicalNumberOfRows() on a XSSFSheet.
Both method returns different number of row.

I have an Excel file with 1103 number of row. Using getLastRowNum() returns 1103 and using
getPhysicalNumberOfRows() returns 1104.


This email has been checked for viruses by Avast antivirus software.

To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org

View raw message