Reputation: 13
I am trying to read data from database and then need to write the data to an excel/csv file in an java application. The data from database can be more than 10000 rows. So could someone suggest a nice solution taking into account the performance issue also.
Is there a way we can directly read and write to excel sheet.
Thanks in advance, Kathy.
Upvotes: 1
Views: 2107
Reputation: 1717
Apache POI will best suits to your problem.
Try the following references example and document.
The second reference will give you the whole implementation of how to work with POI.
Upvotes: 1
Reputation: 1696
You can use Apache POI to do this: http://poi.apache.org
Use the HSSFWorkbook as an abstraction of a .xls workbook. There's also a XSSF format for the newer XML-based Excel files (.xlsx, etc).
Upvotes: 1
Reputation: 7057
Apache has a nice library that should meet your requirements.
Look into http://poi.apache.org/
Hope this helps.
Upvotes: 0