
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.