Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

data from data base to excel in servlet

 
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i am using APache POI XSSF to create an xlsx file , and have selected few column from a table and writing it down in the excel. As the rows returned are more than 10000 , the excel created writes only 8000 rows into it and abrubtly stops without saving the file in temporary location. I want to write large dataset from database to excel .. which API do i need to use... please suggest..
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this,

JEXCEL API
 
carina caoor
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this supports xlsx file. ALso will it handle java heap space error if the file is too large...
 
Vicky Vijay
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It supports the following format,


Reads data from Excel 95, 97, 2000, XP, and 2003 workbooks
Reads and writes formulas (Excel 97 and later only)
Generates spreadsheets in Excel 2000 format


Check this FAQ - (How do I get rid of OutOfMemory exceptions?)

http://jexcelapi.sourceforge.net/resources/faq/
 
Saloon Keeper
Posts: 5878
147
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't there an exception of some kind? I'm fairly certain that there is no intrinsic limit of 8000 rows; maybe a memory problem if you also have many columns (POI is kind of a memory hog). The only other free API I'm aware is jExcelApi, and that doesn't support XLSX, only XLS.

If the exception is indeed a memory problem, just give the JVM more to work with (-Xms -Xmx).
 
carina caoor
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Itried increasing the jvm memory through -Xmx and -Xms.. but it writes only to certain rows like around 8k or 10k.. and stops abrubtly... Does JExcel API writes to XLS files with out any problem though the file size may be around 50k
 
Tim Moores
Saloon Keeper
Posts: 5878
147
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a bit of a hard time understanding that it stops without any exception.
 
carina caoor
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did anybody try Aspose? does it supports heavy data around 50k or more rows witing to excel 2007 files.... please suggest.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!