问题
I need create Excel woorkbooks in Grails, Grails support both Apache POI and JExcel Api, but I would like you to tell me about the advantages and disadvantages of both.
According to I know, Apache POI is more faster than JExcel Api, but the JExcel API have a mos friendly code.
Please if do you tell me about your experience.
Thanks
回答1:
A couple of differences:
- JExcel is limited to Office 2003 formats whereas POI supports the 2007/2010 format (xlsx)
- In many cases Jexcel is a whole lot less memory hungry which can be a factor if you need to juggle big workbooks
- The modelling of the workbook is different, depending on what you're trying to accomplish you'll probably find it's a more natural fit for JExcel's cell orientation or POI's more row oriented approach.
I've done projects with both and did not really find one so superlative I could abandon the other, it's really very task dependent.
回答2:
Differences:
JExcel has better API documentation whereby you can easily find tutorials on the web. On the other hand, apache POI does not have a good documentation compared to JExcel but it does have a very good maling list/forum whereby people there are friendly and helpful.
You will have OutOfMemory problem when creating large Excel 2003 sheets as both APIs dump all data into memory before generating the file. To solve this problem, apache POI comes out with new implementation called XSSF which allows you to create large Excel 2007 sheets without having the OutOfMemory problem. This is a great POI's advantage and that's why I choose POI over JExcel.
PS: If you are interested on XSSF to generate big .xlsx file, search 'BigGridDemo.java' on Google.
来源:https://stackoverflow.com/questions/6865961/evaluation-from-apache-poi-and-jexcel-api