You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Lance Woodson <La...@FranklinCovey.com> on 2007/09/14 17:36:30 UTC

Trouble writing a large file

Hello, all.  I'm using POI to develop a service for our ecommerce website that writes lists of persistent objects to excel spreadsheets and redigests the spreadsheet, updating the persistent objects with any changes made in the spreadsheet.

One issue that has come up is that when writing a large list of a particular kind of persistent object to a file, I get errors in the created xls file that result in the following message being displayed when opening in excel:  "Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted."

The data corruption consistently occurs at 793 records/rows always for this particular type of persistent object, and never for other types of persistent objects with many more rows.  Data in the 792nd row seems no different than the data in previous rows, so my most likely guess is that the data within this particular object not being kosher with some sort of cell constraint.  Also, I can download this file, remove the garbled rows, add rows for new items from 793 down, and the file is digested fine when uploading it.  So everything seems to be constrained to the write operation.

Does anyone have any suggestions as to how I might go about debugging this issue?  POI doesn't give any errors, and there is nothing in excel that I have found that is more helpful than the message above.

Thanks for any help anyone can provide.

-Lance Woodson

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


RE: Trouble writing a large file

Posted by Lance Woodson <La...@FranklinCovey.com>.
Thanks for the advice.

-Lance

-----Original Message-----
From: Nick Burch [mailto:nick@torchbox.com]
Sent: Friday, September 14, 2007 9:47 AM
To: POI Users List
Subject: Re: Trouble writing a large file

On Fri, 14 Sep 2007, Lance Woodson wrote:
> Does anyone have any suggestions as to how I might go about debugging
> this issue?  POI doesn't give any errors, and there is nothing in excel
> that I have found that is more helpful than the message above.

Your best bet is to get two files, one that works, and one that's only had
a single row/cell change and doesn't

Then, use the tools in org.apache.poi.hssf.dev
<http://poi.apache.org/apidocs/org/apache/poi/hssf/dev/package-summary.html>
especially BiffViewer to spot what has changed between the two

You might find the poifs.dev tools useful too, which are a lower level,
but might be easier to spot the bytes that've changed
<http://poi.apache.org/apidocs/org/apache/poi/poifs/dev/package-summary.html>

Nick

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

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.

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


Re: Trouble writing a large file

Posted by Nick Burch <ni...@torchbox.com>.
On Fri, 14 Sep 2007, Lance Woodson wrote:
> Does anyone have any suggestions as to how I might go about debugging 
> this issue?  POI doesn't give any errors, and there is nothing in excel 
> that I have found that is more helpful than the message above.

Your best bet is to get two files, one that works, and one that's only had 
a single row/cell change and doesn't

Then, use the tools in org.apache.poi.hssf.dev
<http://poi.apache.org/apidocs/org/apache/poi/hssf/dev/package-summary.html>
especially BiffViewer to spot what has changed between the two

You might find the poifs.dev tools useful too, which are a lower level, 
but might be easier to spot the bytes that've changed
<http://poi.apache.org/apidocs/org/apache/poi/poifs/dev/package-summary.html>

Nick

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