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?

4

1 に答える 1

1

これは、sax パーサーを使用して大きな xls ファイルを読み取る例です。Sax パーサーは、OOM 例外を回避するのに役立ちます。

Apache POI 経由で大きな Excel ファイル (xlsx) を読み取る際のエラー

于 2012-11-08T12:13:21.753 に答える