This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Writing large data using Apache POI  RSS feed

 
Srikanth Kumar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!