advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Do you need to open Excel documents from Java? Do you think it's a good idea? Are you already using Jakarta to access other Microsoft OLE2 compound documents? Which applications generated the documents you use Jakarta to manipulate? Let us know in the java.general discussion group.
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 3.8/5 | Rate this item | 41 users have rated this item.
 

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.

  Next Page: The Excel Document Model
Page 1: IntroductionPage 3: Build a Practical Example
Page 2: The Excel Document ModelPage 4: Reading an Excel Document
Please rate this item (5=best)
 1  2  3  4  5
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs