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:[email protected]] 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. Regards, Michael.A --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
