Thanks. Yes, I saw that bug when I looked back at the code.  I got too
carried away with incrementing rows.

-----Original Message-----
From: Peter Dow (DSS) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 23, 2005 3:43 PM
To: POI Users List
Subject: RE: Row Number

Hi Kenneth,

I don't know Java, but having used the += operator in other languages, I
think you should probably have something like

        rowNum += (short)1;

which should increment rowNum by 1.  What you have is saying make rowNum
=
rowNum + 7 + 1.

hth,
Peter Dow
Dow Software Services, Inc.
www.dowsoftware.com
909 793-9050 voice
909 793-4480 fax




> -----Original Message-----
> From: Kenneth Litwak [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 23, 2005 2:45 PM
> To: POI Users List
> Subject: Row Number
>
>
>    I thought I wasn't getting rows but I am.  However, something odd
is
> happening.  If I understand the API correctly, you have to specify a
row
> number when you make a row.  So I make a row and then increment the
row
> number.  Then I write another row and increment the row number.  The
> result is that each successive row is not only lower but lower by the
> new value of the row number.  So if the row number in x is 7, and I
make
> new row,
> rowNum+= rowNum + (short)1;
> HSSFRow addClassRow = gwrWS.createRow(rowNum);
>
> the new row is eight rows below the last row.  When I call the same
loop
> again, the next row is nine rows below the last.  So if the row number
> an absolute number or an offset from the last row?  Thanks.
>
> Ken
>
>
> ---------------------------------------------------------------------
> 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/
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.10.14/79 - Release Date:
8/22/2005
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.14/79 - Release Date:
8/22/2005



---------------------------------------------------------------------
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/


---------------------------------------------------------------------
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