Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Learn to Read and Write Microsoft Excel Documents with Jakarta's POI

Jakarta's POI project makes it easy to read and write Excel files and provides support for manipulating other documents based on Microsoft's OLE 2 Compound Document Format. This article contains a step-by-step walkthrough that shows you how to get started with the Jakarta POI project.


advertisement
he purpose of the Jakarta POI open source project is to provide Java with the ability to manipulate file formats based on Microsoft's OLE 2 Compound Document Format. Currently, the most widely accepted part of the project is the Horrible Spread Sheet Format (HSSF) (click the link to discover a bit of the history behind that name.

HSSF provides:

  • An environmental API for read-only access to Excel (97-2000) format.
  • A full user model API for creating, reading and modifying the Excel files.
The HSSF framework is divided into the following packages (see Table 1).

Table 1: Packages in the HSSF framework. The table lists the packages in the HSSF framework and the purpose of each.

Package

Purpose



org.apache.poi.hssf.eventmodel

Handles different events generated in the process of reading and writing Excel documents.

org.apache.poi.hssf.eventusermodel

Provides classes to read Excel documents.

org.apache.poi.hssf.record.formula

Contains classes to handle FORMULA used in Excel document.

org.apache.poi.hssf.usermodel

Contains classes to generate Excel documents.

org.apache.poi.hssf.util

Contains utility classes to handle different attributes of the Excel document.


Using these packages you can interact with existing Excel documents and create new ones. Before starting to develop the example, here's a brief explanation of how the POI models an Excel document.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap