You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by jaikiran pai <ja...@yahoo.co.in> on 2007/01/13 10:40:48 UTC
HSSFSheet's getPhysicalNumberOfRows and getLastRowNumber return wrong values
Hi,
I have a xls file which contains 10 rows. But when i invoke the getPhysicalNumberOfRows and getLastRowNumber method on HSSFSheet, i get values as 224 and 223. Here's the code:
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream("c:\\TEST.XLS"));
HSSFWorkbook wb = new HSSFWorkbook(fs);
for (int i=0;i<wb.getNumberOfSheets();i++){
HSSFSheet sheet = wb.getSheetAt(i);
System.out.println("Physical number of rows: " + sheet.getPhysicalNumberOfRows());
System.out.println("Number of rows: " + sheet.getLastRowNum());
}
Any idea what's wrong with the code. Have attached the xls file for reference.
regards,
-Jaikiran
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/