poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl-Heinz Zengerle <karlhe...@sawag.com>
Subject Re: HSSFSheet.removeRow()
Date Thu, 01 Jul 2004 15:17:20 GMT
Hi Davinder.

Indexes start at 0. So typically a none value is expressed by a negative
value. So it's nothing strange.

Regards, Karl-Heinz.


Am Do 01.07.2004 17:15 schrieb Davinder Kohli <kdavinder@yahoo.com>:

> In a sheet containing 65536 rows, I invoked removeRow,
> after all rows were removed the lastRowNum and
> firstRowNum were both set to -1. Shouldn't both these
> be set to 0?
> 
> HSSFSheet sheet = m_workbook.getSheet(sheetName);
> // get the last row num
> int lastRowNum = sheet.getLastRowNum();
> // lastRowNum returns 65535
> for (int i = 0; i < lastRowNum +1; i++)
> {
>   // get the row and remove it
>   sheet.removeRow(sheet.getRow(i));
> }
> 
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 


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


Mime
View raw message