You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Fatih <fk...@yahoo.com> on 2004/10/26 13:04:52 UTC
POI HSSF File size
Hello,
I am currently testing poi hssf API, i made a simple test as follow :
....
FileInputStream fileIn = new FileInputStream("c:\\filein.xls");
POIFSFileSystem fs = new POIFSFileSystem(fileIn);
HSSFWorkbook wb = new HSSFWorkbook(fs);
FileOutputStream fileOut = new FileOutputStream("c:\\fileout.xls");
wb.write(fileOut);
fileOut.close();
fileIn.close();
....
The input file (filein.xls) has a size of 2 792 960 bytes.
The output file (fileout.xls) has a size of 5 920 256 bytes.
I made no changes in the file, just the code described above but i don't really
understand why my output file doubled its size.
Anyone has an idea ?
Thanks
Fatih
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: POI HSSF File size
Posted by Danny Mui <da...@muibros.com>.
Excel uses some file size shortcuts, HSSF does not as they are a bit
convoluted and hard to debug if they go wrong.
Lots of text is "compressed" in this way, so that may explain your file
size change.
Fatih wrote:
> Hello,
> I am currently testing poi hssf API, i made a simple test as follow :
>
> ....
> FileInputStream fileIn = new FileInputStream("c:\\filein.xls");
> POIFSFileSystem fs = new POIFSFileSystem(fileIn);
> HSSFWorkbook wb = new HSSFWorkbook(fs);
> FileOutputStream fileOut = new FileOutputStream("c:\\fileout.xls");
> wb.write(fileOut);
> fileOut.close();
> fileIn.close();
> ....
>
> The input file (filein.xls) has a size of 2 792 960 bytes.
> The output file (fileout.xls) has a size of 5 920 256 bytes.
>
> I made no changes in the file, just the code described above but i don't really
> understand why my output file doubled its size.
>
> Anyone has an idea ?
>
> Thanks
>
> Fatih
>
>
>
>
> ---------------------------------------------------------------------
> 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