Choosing an excel java api [closed]

人走茶凉 提交于 2019-12-18 04:24:23

问题


All I need to do is open an MS excel sheet - not sure which kind yet (2003, 2007, etc.) - and parse the information in each row into an object. I'm performing only readonly operations.

out of Apache POI, JExcelAPI, or OpenXLS which is best for this task?

I'd rather not find out about anymore api's but if you're certain that none of these are the best then I'll take your input.


回答1:


I have used POI only but found it to be simple to use and work as advertised.




回答2:


I do NOT recommend OpenXLS. I used it for a little while but became very frustrated by the limits of the free version. If you want to write formulae, for example, you can't. Unless you buy the commercial version that the company behind OpenXLS sells, anyway.

I've been using JExcelAPI for the last few months and am quite impressed with it. It's very easy to use it to read and write Excel spreadsheets. The documentation is fairly good but it could be better. If you haven't already made your choice, I would recommend JExcelAPI to you.

I'm afraid that I haven't tried POI so I can't comment on it.




回答3:


I have used only JExcelAPI, and found it quite usable and solid. Encountered one weirdness, but it was in writing, not reading, and is clearly documented (with solution) in their FAQ, so - happy to recommend it.




回答4:


FWIW and Extentech - the makers of OpenXLS - released a new version that now supports adding formulas and executing them like so:

CellHandle cx = sheet.add("=sum(a1+a2)","b1");
String val = cx.getFormulaHandle().getFormattedValue();

Also, you will find that Sheetster.com is an open source web spreadsheet from Extentech and you can embed a nice web spreadsheet in your web apps.



来源:https://stackoverflow.com/questions/1128318/choosing-an-excel-java-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!