You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Alex Phung <al...@intercax.com> on 2010/04/12 17:25:21 UTC

Updating an Excel Workbook

Is updating an Excel Workbook the same as the following?

1)       reading in the entire workbook in memory             

2)       update specific contents - i.e. updating a value in a single cell
or updating values in several cells

3)       writing the workbook replacing the original workbook

 

I noticed that the size of the xls or xlsx is less than the original
regardless of how many cells I update.  Does that mean that some information
is left out (or not read in) from the original file?  Are there any
limitation in this use case (charts, formulas, etc..)?

 


Re: Updating an Excel Workbook

Posted by Ramon F Herrera <ra...@patriot.net>.
On 4/12/2010 10:25 AM, Alex Phung wrote:
> Is updating an Excel Workbook the same as the following?
>
> 1)       reading in the entire workbook in memory
>
> 2)       update specific contents - i.e. updating a value in a single cell
> or updating values in several cells
>
> 3)       writing the workbook replacing the original workbook
>
>
>
> I noticed that the size of the xls or xlsx is less than the original
> regardless of how many cells I update.  Does that mean that some information
> is left out (or not read in) from the original file?  Are there any
> limitation in this use case (charts, formulas, etc..)?
>
>
>
>

Alex,

The unexpected shrinking/growing problem is very common with files of a 
complex hierarchical structure. Disclaimer: I am talking about my 
experience with PDF files. There are "dirty records" that remain around, 
due to the trade-off between file size and speed.

In Acrobat I always do a "Save As" to have a clean, compact file. Such 
operation performs garbage collection, but te images, etc. remain intact.

I am sure the POI/Microsoft folks face the same issues as Adobe.

Regular Unix files can also have "holes" in them. This is the case with 
Oracle-mapped files.

I wouldn't worry about it, unless you are curious.

-Ramon




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