1

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.

Krbd
  • 13
  • 1
  • 1
  • 7

4 Answers4

1

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.

Tiny
  • 27,221
  • 105
  • 339
  • 599
Girish
  • 1,717
  • 1
  • 18
  • 30
1

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).

Ben Griffiths
  • 1,676
  • 15
  • 13
0

When it comes to java excel you should try out Apache POI.

Helios
  • 851
  • 2
  • 7
  • 22
0

Apache has a nice library that should meet your requirements.

Look into http://poi.apache.org/

Hope this helps.

Tanmay Patil
  • 6,882
  • 2
  • 25
  • 45