0

Is there a way to use WorkbookFactory with big Excel file? (5,5 MB)

Workbook wb = WorkbookFactory.create(new FileInputStream(file));

when the file became big, by using background-colors." I get the error: java.io.IOException: GC overhead limit exceeded. Altering the excel is not an option. Is it possible to ignore the styles when reading the excel? side info: The background was changed for a lot of rows that don't contain text.

Kim
  • 1

1 Answers1

1

Here is the answer to your question:

Writing

For writing very huge files, there is SXSSFWorkbook which allows to do a streaming write of data out to files (with certain limitations on what you can do as only parts of the file are held in memory).

Reading

For reading very huge files, take a look at the sample XLSX2CSV which shows how you can read a file in streaming fashion (again with some limitations on what information you can read out of the file, but there are ways to get at most of it if necessary).

Volodya Lombrozo
  • 2,325
  • 2
  • 16
  • 34