Is there any Java library which supports both Microsoft office and Open Office?

拟墨画扇 提交于 2019-12-06 03:13:33

Aspose covers all of Microsofts formats, but it is not free and not open source.

Regarding open source Java API, you can find a review on each available java library here,

http://www.esupu.com/open-source-office-document-java-api-review/

Apache UNO Java library supports all according to my knowledge and it's free and open source but it need a Open Office installation to process and it's documentation is heavy and not that much clear

docx4j is a Java library for creating and manipulating Microsoft Open XML (Word docx, Powerpoint pptx, and Excel xlsx) files.

Docx4j

There is probably no library that would support both formats. If you don't want to use a library (and write the needed code) for each format, you can try a workaround.

Use a converter to convert .xls to .odt (or the other way around), then use your favourite library to handle that one format.

Available converters I found via quick Googling, I'm sure you'll find more:

Consider converting both formats to something more friendly, like a CSV (more CSV) or XML.

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