You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by jo...@k12s.phast.umass.edu on 2008/05/02 04:15:45 UTC
Re: Re[2]: Problem with POI 3
-- Yegor Kozlov wrote :
> Provide a snippet of the code so we can help you diagnose your
> problem.
>
> The exception message "Row number must be between 0 and 65535, was <-32768>"
> means that somewhere in your jsp you call sheet.createRow(-32768);
>
> Yegor
I would hate to dig up a thread from 2007, but google brought me here :)
I think KiKicool is right, there is a problem with POI. We're running into the problem too, and I double checked that I am passing an int in, and also double checked by sending it to System.out.println.
I checked the POI source code and found in HSSFCellUtil this method:
public static HSSFRow getRow(int rowCounter, HSSFSheet sheet) {
HSSFRow row = sheet.getRow((short)rowCounter);
if (row == null) {
row = sheet.createRow((short)rowCounter);
}
return row;
}
This is the function that we're using. You can see it's casting it to a short. I checked POI 3.0.2 and 3.1 beta. They both crash, and have the offending code. Should be an easy fix.
-Joe
--
This message was sent on behalf of joe@k12s.phast.umass.edu at openSubscriber.com
http://www.opensubscriber.com/message/user@poi.apache.org/7557766.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Re[2]: Problem with POI 3
Posted by Nick Burch <ni...@torchbox.com>.
On Thu, 1 May 2008 joe@k12s.phast.umass.edu wrote:
> I checked the POI source code and found in HSSFCellUtil this method:
The underlying methods on HSSFRow and HSSFSheet now take ints, so I've
fixed HSSFCellUtil in svn trunk to take advantage of this, and avoid the
issue
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org