2009년 2월 12일 목요일

Java libraries to read and write Word DOC files

Arguably the most popular file format for documents, simply because of the high market share of Microsoft Office. Unfortunately, the .doc file format changes with every new version of Word, so there is not a single Word file format but a number of them. Make sure to find out which version of Word your Java application will have to interface with.

Instead of dealing with the complicated Word DOC file format it is often sufficient to exchange RTF (Rich Text Format) files. RTF is more simple than DOC, well-documented and even supported in Java's standard runtime library since Java 1.2 (see the API documentation of the javax.swing.text.rtf package).

If you need to support .doc itself, here are some libraries for it.

Library / package License Description
SoftArtisans OfficeWriter Commercial Write Word and Excel files.
POI Apache Software License 1.1 Read and write DOC files (only very basic support right now). POI is already covered on the Excel page: POI.
Java Bean Word Processing Freeware Read and write Word 97 and 2000 files. Needs a driver that runs only under Windows.
Davisor Offisor Commercial Reads Word files and transform them to XML. Pure Java solution.
RasterMaster Commercial Read Word files.

댓글 없음:

댓글 쓰기