File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Writing large data using Apache POI Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "Writing large data using Apache POI" Watch "Writing large data using Apache POI" New topic
Author

Writing large data using Apache POI

Srikanth Kumar
Ranch Hand

Joined: Jun 04, 2008
Posts: 36
I am trying to write 20000 records in an excel sheet using Apache POI. When i try to do this the process is taking more than 7 minutes. Sometimes i even get the java.lang.OutOfMemoryError. my code simply writes the data retrieved from the database to the excel sheet.


I dint understand the problem in the code. is anything going wrong?
Thanks in advance.

[ November 25, 2008: Message edited by: Srikanth Kumar ]
[ November 27, 2008: Message edited by: Martijn Verburg ]

Srikanth Kumar
SCJP 5, SCWCD 5, SCDJWS 5
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35223
    
    7
POI is known to need a lot of memory (the reason for that is most likely the OLE document format, which is quite complex). Can you allocate a larger heap size to the JVM?


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Writing large data using Apache POI
 
Similar Threads
opening the excel sheet from servlet
Creating excel with add-on Bloomberg function using POI
facing diffculty to highlight background color of an excel cell which is not reflected in file
JSP to Excel Conversion
How to make POI HSSF support Chinese Encoding?