You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Avik Sengupta <av...@itellix.com> on 2006/08/23 17:11:55 UTC

Re: excel file size increases after wrtiting using HSSFWorkbook.write

Some stuff that excel writes in a compressed form, poi stores in  
uncompressed form. The uncompressed form is perfectly acceptable to  
excel for reading. Therefore, the file size very likely increases on  
reading and writing a file via POI.

The only way to solve an outofmemory at this time is to provide larger  
heap to the JVM.

Regards
-
Avik


Quoting Niharika Mateti <mn...@gmail.com>:

> A file of size 1.4 mb is increasing to 2.0 mb. I am getting
> java.lang.outofmemory exceptions at line
> wb.write(fos).
>
> Does anyone have any ideas on how to solve this.
>
> Thanks,
> Niharika
>
>
> On 8/22/06, Sebastian Frehmel <uh...@stud.uni-karlsruhe.de> wrote:
>>
>> I have the same phenomenon here with 3.0
>> It seems POI is not yet fully like the real Excel file format, so it
>> saves unnecessary information or something like that.
>>
>>
>> Niharika Mateti schrieb:
>>> Hi,
>>>
>>> I am using POI to modify an excel sheet. But somehow the file size
>>> increases a lot even if I don't modify anything, and just save it.
>>> When I open that saved excel sheet in Microsoft Excel, and save it, the
>>> file size is again decreased. I am using poi version 2.5.
>>>
>>> My code is as follows
>>>
>>>
>>> POIFSFileSystem fs = *new* POIFSFileSystem(*new*
>>> BufferedInputStream(is));
>>>
>>> HSSFWorkbook wb = *new* HSSFWorkbook(fs);
>>>
>>> fos = *new* FileOutputStream(filename);
>>>
>>> wb.write(fos);
>>>
>>> Thanks,
>>> Niharika
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
>> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>>
>>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/