[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-user
Subject:    RE: What is the correct method to read a large excel file line by line?
From:       "Levi Strope" <lstrope () besttransport ! com>
Date:       2007-04-12 13:24:04
Message-ID: 493777A77CE66D4EA779F5ABFB5A5E4646323D () mickey ! bt ! local
[Download RAW message or body]

I just want to clarify, as my boss is asking me to look into it further.
Per the documentation is says that using the HSSF eventusermodel is much
more efficient in terms of memory.  Does this mean that I can read in an
excel document without loading the entire document into memory first?
Reading it line by line is not a requirement, but in some cases we have
files that are over 100 meg.  I need to know if I can read it in in
pieces, or iterate through the records by request without having the
entire document loaded into memory first.  Is this possible?

Thanks
-Levi 

 

-----Original Message-----
From: Yegor Kozlov [mailto:yegor@dinom.ru] 
Sent: Tuesday, April 10, 2007 12:24 PM
To: POI Users List
Subject: Re: What is the correct method to read a large excel file line
by line?

Hi,

Current implementation reads the whole document into memory.
There is no way to read excel files line by line.

Regards,
Yegor

LS> Using HSSF, what is the correct method to read large excel files 
LS> line by line?
 
LS> In my real world situation the excel file will be very large, over 
LS> 100 megs.  I need to be able to read the file line by line so that 
LS> the large file size does not cause memory issues.
 
LS> I have tried to use a BufferedInputStream to read in the file but 
LS> that results in invalid header exceptions when I try to do a read().

LS> I can use the BufferedInputStream as is if I give the whole thing to

LS> the workbook to process.However this pretty much forces me to read 
LS> in the entire file at once does it not?
 
LS> If anyone has any examples, or can round about hint at what I need 
LS> to do I would be most appreciative.
 
LS> Thank you,
LS> Levi


---------------------------------------------------------------------
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/


---------------------------------------------------------------------
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/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic