How is the Excel file you are working with created? Excel is a little odd and it can store a row record if a single cell on that row is edited in any way by the user/creator. By this, I mean, if the user enters data into a cell on a row and then deletes that cell, Excel may still store the record for the row into the file.
If you are working with one of the newer OOXML format files, it is very easy to perform a quick cehck to see if this is the case. Simply use a tool like WinRAR or PKUnzip to extract tha xml markup from the .xlsx archive. Next, navigate yourself to the xml markup for the specific sheet - it should be stored in a file with a name like sheet1.xml - and then open that with a text editor. Inside, you ought to see that there is an element for each row Excel believes to be on the worksheet and you can simply count them up. It ought to be the case that POI is reporting the number of row elements accurately. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Error-detecting-last-edited-row-tp5712664p5712668.html Sent from the POI - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
