简体   繁体   中英

Are there any languages that can be integrated with java that read large XLSX files efficiently?

So i'm working on an app that needs to frequently read large XLSX files. I'm using Java, and Apache POI keeps running out of memory on certain XLSX files. I know theres a way to XML parse with POI, but it looks pretty messy.

Resaving these files as another format (XLS, CSV) is not an option because the entire process needs to be automated, and some of these files have multiple sheets or exceed the row count allotted for XLS files.

I've also thought about writing a script to "recreate" the excel files with only the underlying data, but this is not ideal because there are formats that need to be preserved on some files.

Are there any languages that I can call from Java that can read large XLSX files without memory issues?

@Gus, I had the same problem. I had to read a 13MB XLSX and ran out of heap with conventional POI. I had to implement XSSF+SAX API to read the file. Although very difficult to understand at first, I'm able to read my XLSX file easily with it (and very quickly, too).

http://poi.apache.org/spreadsheet/how-to.html#xssf_sax_api

The Apache guys give an example of it's usage in the link. In my case I copied the code and adapted to my needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM