Are there any alternatives to using Apache POI Java for Microsoft Office?

寵の児 提交于 2019-12-07 00:53:41

问题


I discovered Apache POI for doing a lot with MS Office programmatically in Java, but its documentation leaves me wanting, as well as a few other things. Does a better alternative exist?

I thought to myself that OpenOffice.org might have something, but cannot find any concise site that would have a Library that would allow you to open and store Word, Powerpoint, Excel, or other MS Office applications through Java.

Do any better alternatives exist?


回答1:


I think POI is the best among other libraries. I don't know the reason why you don't like it

Excel .xls & .xlsx

HSSF is the POI Project's pure Java implementation of the Excel '97(-2007) file format. XSSF is the POI Project's pure Java implementation of the Excel 2007 OOXML (.xlsx) file format.

Word .doc & .docx

HWPF is the name of our port of the Microsoft Word 97(-2007) file format to pure Java. It also provides limited read only support for the older Word 6 and Word 95 file formats. The partner to HWPF for the new Word 2007 .docx format is XWPF. Whilst HWPF and XWPF provide similar features, there is not a common interface across the two of them at this time.

anyway here are some libraries : Try Aspose and java2word




回答2:


On the Aspose.cells site they offer a comparison to its open source competitors.

http://www.aspose.com/docs/display/cellsjava/Aspose.Cells+for+Java+Vs+Open+Source+Competitors

They contrast with the following:

JExcelAPI POI-HSSF

Not an unbiased comparison probably but...




回答3:


I maintain docx4j, which is a strongly typed ASL v2 library for manipulating the XML file types (docx, pptx, xlsx) via JAXB.

If you also need to deal with the legacy binary formats (doc, ppt, xls), you'd need to pre-convert them to docx/pptx/xlsx before bringing docx4j to bear on them.

See more at Apache POI or docx4j for dealing with docx documents



来源:https://stackoverflow.com/questions/4601722/are-there-any-alternatives-to-using-apache-poi-java-for-microsoft-office

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