Something on the lines of :--
=======================================
short rowNumber = 0;
mySheet = workbook.createSheet();
HSSFRow r;  
 
while(rs.next())
{
   r = mySheet.createRow(rowNumber);
   //write cells in row
   rowNumber++;
   if (rowNumber > 65000) {
       mySheet=workbook.createSheet();
       rowNumber=0;
   }
}

==============================================
On Thu, 2003-01-09 at 21:41, Brian Glick wrote:
> Does anyone have a method to create a new sheet once you've exceeded the 65K
> row limit in a sheet?  I'm trying to run a 70,000 line report, and I want to
> wrap the records into a new sheet.
> 
> Basically what I'm doing now is:
> 
> short rowNumber = 0;
> HSSFRow r = mySheet.createRow(rowNumber);
> 
> while(rs.next())
> {
>   //write cells in row
>   rowNumber++;
> }
> 
> I figure I need to replace "rowNumber++" with a method to return the next
> number or set "mySheet" to a new sheet and return 0 to start over, but I
> can't figure out exactly how to do this.
> 
> Thanks in advance for any help,
> 
> Brian Glick
> Freightek, Inc.
> (215) 887-6100
> [EMAIL PROTECTED]
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to