Efficient Java library for reading Excel files?

Is there a Java memory library for reading large Microsoft Excel files (both .xls and .xlsx)? I have very limited experience with the Apache POI, and this seemed to be a huge memory from what I remember (although perhaps it was just for writing, not reading). Is there something better? Or am I forgetting and / or misusing POIs?

It would be important for him to have a "friendly" open source license.

+6
source share
3 answers

The Apache POI library has an event-based API that has a smaller memory size. Unfortunately, it only works with HSSF (Horrible Spreadsheet Format), and not with XSSF (XML table format - for OOXML files).

+5
source

Excel file formats (both) are huge and extremely complex, and everything that reads all their possible contents will be equally huge and complex. Remember that they can contain ranges, macros, links, embedded materials, etc.

However, if you are reading something as simple as a grid of numbers, I recommend that you first convert the table to something simpler, such as CSV, and then read this format.

+1
source

Take a look at JExcel:

http://jexcelapi.sourceforge.net/

I cannot explain the amount of memory, but obviously with large spreadsheets that you are going to consume a lot of memory for processing.

You can use it for xls and xlsx:

Read XLSX file in Java

0
source

All Articles