레이블이 Library / API인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Library / API인 게시물을 표시합니다. 모든 게시물 표시

2009년 2월 12일 목요일

Java libraries to read and write Excel XLS document files

Microsoft Excel spreadsheet files typically have a file extension of .xls. The newer versions of this format are subtypes of the Microsoft OLE 2 compound document file format, just like its fellow office file formats Word .doc and PowerPoint .ppt.

If you don't want to read and write this rather complex file format directly, you might also be successful exchanging data with Excel from your Java application by reading and writing simple text files that contain rows with tab- or comma-separated values (.csv). Java libraries for these replacement formats can be found in the Java data formats section of the Open Directory.

Excel is also able to access spreadsheet data from tables in in HTML files.

Library / package License Description
Actuate Spreadsheet Engine Commercial, 30-day trial version available Write Excel (XLS) files.
ExcelAccessor ? Read and write Excel (XLS) files.
ExcelReader ? JavaWorld article on how to read Microsoft Excel (XLS) files, including code. Requires an installed Microsoft ODBC driver for Excel files, and Sun's ODBC-JDBC driver.
ExtenXLS Commercial, 30-day trial version available Read and write Microsoft Excel (XLS) files.
JACOB project LGPL Java COM bridge with examples to interface Excel.
Java Excel API LGPL Read Excel (XLS) 97, 98 and 2000 files.
Java to Excel conversion ? Write SYLK files, which Excel can import and export.
JExcel Commercial Swing component to integrate Excel via JNI.
jXLS LGPL Create Excel files using XLS templates.
POI Apache Software License 1.1 Read and write Microsoft OLE 2 compound document format files. This includes MS Office files (DOC, XLS, PPT) written with Office versions that were released after 1997.
Snowbound Commercial Read Excel files.
SoftArtisans OfficeWriter Commercial Write Word and Excel files.
Vista JDBC Commercial, 15-day trial version available JDBC driver to access MS Excel (XLS) files.
xlSQL GPL JDBC driver to access MS Excel (XLS) and CSV files.

Java libraries to read and write PowerPoint PPT document files

The application PowerPoint is presentation software and a part of Microsoft Office. Its native file format has a file extension of .ppt. This page lists Java software to read and write PPT files.

Library / package License Description
Davisor Offisor Commercial Read Powerpoint (PPT) files. Can convert them to XML. 100% Java.
POI Apache Software License 1.1 Read and write Microsoft OLE 2 compound document format files. This includes MS Office files (DOC, XLS, PPT) written with Office versions that were released after 1997.
Tonic Java PowerPoint Library Commercial, demo available Read, create and manipulate PowerPoint files. 100% Java. Also available is a free Java reader for PPT files.

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.