English 中文(简体)
writing large excel spreadsheets
原标题:

has anybody found a library that works well with large spreadsheets?

I ve tried apache s POI but it fails miserably working with large files - both reading and writing. It uses massive amounts of memory leaving you needing a supercomputer to parse or create a 20+mb spreadsheet.

Surely there is a more memory efficient way and someone has written it?!

最佳回答

at time of posting, there is no pure java scalable solution for reading and writing large excel files.

问题回答

@pstanton.. I was working on a similar solution and was able to write large excel 2007 files with hundreds of rows exported from database. Here is the link to it: http://vikramvkamath.blogspot.com/2010/07/writing-large-excel-files-excel-2007.html

My solution is an extension on Yegor Koslov s SheetWriter class follow this http link and it works very well for me. Let me know in case you face any issues.

~Vikram

I cannot really recommend a library to you. But when you need the best performance, it might be worth a try to go to the people who came up with Excel in the first place. I guess the APIs that are available from .NET are much more efficient in handling Excel files. So the idea would be to implement a web service or similiar component in .NET that does most of the Excel-related grunt work for you and just invoke that from Java.

This is basically the same idea as Jannik s, but you use the Java COM Bridge to access the Excel APIs directly from Java. We have had good success doing this with Word. Obvious downside is that it only works on Windows.

Have you tried JExcelAPI as an alternative to POI ? I confess I can t comment on it s memory efficiency.

May be CSV file format can help you. You just need to seperate each value by comma and save file with .csv extension.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签