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/

Attachment: test.xls
Description: MS-Excel spreadsheet

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to