You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Roger Misteli <ro...@abacus.ch> on 2004/10/08 10:30:00 UTC
Record size does not match serialized bytes ???
Hiyas,
when exporting a report to Excel using POI, I get this exception. It
doesn't occur on every report, so far its only one report. Does anyone
know what this means and what I can do to make it disappear?
Caused by: java.lang.IllegalStateException: Record size does not match
serialized bytes. Serialized size = 80 but getRecordSize() returns 96
at org.apache.poi.hssf.model.Sheet.serialize(Sheet.java:819)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:802)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:740)
at ch.abacus.lib.phoenix.producer.xls.POIOutputProcessor.exit(POIOutputProcessor.java:55)
at ch.abacus.lib.phoenix.producer.AbstractPagePrinter.exit(AbstractPagePrinter.java:63)
...
Thanks very much
Roger Misteli
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: How to make sure a certain sheet is displayed in excel during
opening the POI-Gen. file ?
Posted by Danny Mui <da...@muibros.com>.
ok found a patch for this in bugzilla. if i dont commit this/research
this soon(TM) please remind me :)
Jan-Martin Roth wrote:
> I am generating an excel file with 3 sheets via POI.
>
> When I store the file and open it with excel, the 3rd sheet is shown.
> Now I want to make sure, the 1st sheet (overview) shows up when the file
> is opened by someone.
> I tried the setSelected on the 1st sheet, but this only results in the
> tab for the 1st sheet having white background, but the 2nd is shown to
> the user.
> I found, I'm not the only one experiencing this problem:
> http://java2.5341.com/msg/78833.html
>
> Has anybody a solution?
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
How to make sure a certain sheet is displayed in excel during opening
the POI-Gen. file ?
Posted by Jan-Martin Roth <jm...@mtg.de>.
I am generating an excel file with 3 sheets via POI.
When I store the file and open it with excel, the 3rd sheet is shown.
Now I want to make sure, the 1st sheet (overview) shows up when the file
is opened by someone.
I tried the setSelected on the 1st sheet, but this only results in the
tab for the 1st sheet having white background, but the 2nd is shown to
the user.
I found, I'm not the only one experiencing this problem:
http://java2.5341.com/msg/78833.html
Has anybody a solution?
Re: Record size does not match serialized bytes ???
Posted by Danny Mui <da...@muibros.com>.
Even better :)
keep removing code until you reproduce it...or fire up your program in
debug mode and check out the variable that Sheet.serialize dies on.
Roger Misteli wrote:
> How can I find out what record this could be?
> I can reproduce it on one report always, but I don't know why. I will
> try to create a special test case though. And I don't use any templates,
> I create the XLS from scratch.
>
> Thanks & regards
> Roger Misteli
>
> It was Fri, 08 Oct 2004 12:26:36 -0400, a beautiful sunny day, until Danny Mui <da...@muibros.com> wrote this:
>
>
>>it may be a special record...any idea which record?
>>
>>can you reproduce this in a simple spreadsheet?
>>
>>if so, send it up to bugzilla!
>>
>>are you generating the complete spreadsheet or using a template?
>>perhaps it's not as "clean" as it can be. regenerating the sheet from
>>scratch can help at times.
>>
>>Roger Misteli wrote:
>>
>>>Hiyas,
>>>
>>>when exporting a report to Excel using POI, I get this exception. It
>>>doesn't occur on every report, so far its only one report. Does anyone
>>>know what this means and what I can do to make it disappear?
>>>
>>>Caused by: java.lang.IllegalStateException: Record size does not match
>>>serialized bytes. Serialized size = 80 but getRecordSize() returns 96
>>> at org.apache.poi.hssf.model.Sheet.serialize(Sheet.java:819)
>>> at org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:802)
>>> at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:740)
>>> at ch.abacus.lib.phoenix.producer.xls.POIOutputProcessor.exit(POIOutputProcessor.java:55)
>>> at ch.abacus.lib.phoenix.producer.AbstractPagePrinter.exit(AbstractPagePrinter.java:63)
>>>...
>>>
>>>
>>>Thanks very much
>>>Roger Misteli
>>>
>>>
>>>---------------------------------------------------------------------
>>>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
>
>
>
> /*
> * Roger Misteli - ABACUS Research AG
> * email: roger.misteli@abacus.ch (PGP key available)
> * "If you think the problem is bad now, just wait until we've solved it."
> */
>
>
>
> ---------------------------------------------------------------------
> 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
Re[2]: Record size does not match serialized bytes ???
Posted by Roger Misteli <ro...@abacus.ch>.
How can I find out what record this could be?
I can reproduce it on one report always, but I don't know why. I will
try to create a special test case though. And I don't use any templates,
I create the XLS from scratch.
Thanks & regards
Roger Misteli
It was Fri, 08 Oct 2004 12:26:36 -0400, a beautiful sunny day, until Danny Mui <da...@muibros.com> wrote this:
> it may be a special record...any idea which record?
>
> can you reproduce this in a simple spreadsheet?
>
> if so, send it up to bugzilla!
>
> are you generating the complete spreadsheet or using a template?
> perhaps it's not as "clean" as it can be. regenerating the sheet from
> scratch can help at times.
>
> Roger Misteli wrote:
> > Hiyas,
> >
> > when exporting a report to Excel using POI, I get this exception. It
> > doesn't occur on every report, so far its only one report. Does anyone
> > know what this means and what I can do to make it disappear?
> >
> > Caused by: java.lang.IllegalStateException: Record size does not match
> > serialized bytes. Serialized size = 80 but getRecordSize() returns 96
> > at org.apache.poi.hssf.model.Sheet.serialize(Sheet.java:819)
> > at org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:802)
> > at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:740)
> > at ch.abacus.lib.phoenix.producer.xls.POIOutputProcessor.exit(POIOutputProcessor.java:55)
> > at ch.abacus.lib.phoenix.producer.AbstractPagePrinter.exit(AbstractPagePrinter.java:63)
> > ...
> >
> >
> > Thanks very much
> > Roger Misteli
> >
> >
> > ---------------------------------------------------------------------
> > 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
/*
* Roger Misteli - ABACUS Research AG
* email: roger.misteli@abacus.ch (PGP key available)
* "If you think the problem is bad now, just wait until we've solved it."
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: Record size does not match serialized bytes ???
Posted by Danny Mui <da...@muibros.com>.
it may be a special record...any idea which record?
can you reproduce this in a simple spreadsheet?
if so, send it up to bugzilla!
are you generating the complete spreadsheet or using a template?
perhaps it's not as "clean" as it can be. regenerating the sheet from
scratch can help at times.
Roger Misteli wrote:
> Hiyas,
>
> when exporting a report to Excel using POI, I get this exception. It
> doesn't occur on every report, so far its only one report. Does anyone
> know what this means and what I can do to make it disappear?
>
> Caused by: java.lang.IllegalStateException: Record size does not match
> serialized bytes. Serialized size = 80 but getRecordSize() returns 96
> at org.apache.poi.hssf.model.Sheet.serialize(Sheet.java:819)
> at org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:802)
> at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:740)
> at ch.abacus.lib.phoenix.producer.xls.POIOutputProcessor.exit(POIOutputProcessor.java:55)
> at ch.abacus.lib.phoenix.producer.AbstractPagePrinter.exit(AbstractPagePrinter.java:63)
> ...
>
>
> Thanks very much
> Roger Misteli
>
>
> ---------------------------------------------------------------------
> 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