0

This is a very challenging task to me as i am doing pretty much R&D to get rid of OutOfMemroyError during conversion of XLSX to CSV and my excel file can have three sheets and each sheet with 60000 rows. I used XSSF and SAX (Event API) recently since this approach consumes very less memory. However the Event API is triggering events only for things actually stored within the file and this can be cause for me.

Earlier to this Event API approach, i used Workbook class to process XLSX file and eventually i am getting out of memory during this workbook creation provided below.

Workbook workbook = WorkbookFactory.create(new File("myfile.xlsx"));

so, what is the best way to process large volume of XLSX data with apache POI?

janasainik
  • 811
  • 5
  • 20
  • 40

1 Answers1

1

Here is an example for reading a large xls file using sax parser. Sax parser will help you avoid OOM exceptions.

Error While Reading Large Excel Files (xlsx) Via Apache POI

Community
  • 1
  • 1
O.C.
  • 6,711
  • 1
  • 25
  • 26