What is poi? [Apache.org excerpt] how to access Microsoft files using Java APIs [Excel, Word, etc]

Source: Internet
Author: User
ArticleDirectory
    • Purpose
    • Components to date
Purpose

The poi project consists of APIS for manipulating various file formats based upon Microsoft's Ole 2 compound document format using pure Java. in short, you can read and write MS Excel files using Java. soon, you'll be able to read and write Word files using Java. poi is your Java Excel solution as well as your Java word solution. however, we have a complete API for porting other Ole 2 compound document formats and welcome others to participant.

Ole 2 compound document format based files include most Microsoft Office files such as XLS and Doc as well as MFC serialization API based file formats.

As a general policy we try to collaborate as much as possible with other projects to provide this functionality. examples include: cocoon for which there are serializers for hssf; open office.org with whom we collaborate in documenting the XLS format; and Lucene for which we'll soon have file format interpretors. when practical, we donate components directly to those projects for poi-enabling them.

Why/When wocould I use poi?

We'll tackle this on a component level. Poi refers to the whole project.

So why shoshould you use poifs or hssf?

You 'd use poifs if you had a document written in OLE 2 compound document format, probably written using MFC, that you needed to read in Java. alternatively, you 'd use poifs to write Ole 2 compound document format if you needed to inter-operate with software running on the Windows platform. we are not just bragging when we say that poifs is the most complete and correct implementation of this file F Ormat to date!

You 'd use hssf if you needed to read or write an Excel file using Java (xls). You can also read and modify spreadsheets using this API, although right now writing is more mature.

Components to dateoverview

The following are components of the entire poi project and a brief summary of their purpose.

Poifs for OLE 2 Documents ents

Poifs is the oldest and most stable part of the project. it is our port of the OLE 2 compound document format to pure Java. it supports both read and write functionality. all of our components ultimately rely on it by definition. please see the poifs project page for more information.

Hssf for Excel documents ents

Hssf is our port of the Microsoft Excel 97 (-2002) file format (biff8) to pure Java. It supports read and write capability. Please see the hssf project page for more information.

Hwpf for Word documents

Hwpf is our port of the Microsoft Word 97 file format to pure Java. it supports read and write capability. please see the hwpf project page for more information. this component is in the early stages of development. it can already read and write simple files.

Presently we are looking for a contributor to foster the hwpf development. Jump in!

Hpsf for document properties

Hpsf is our port of the OLE 2 property set format to pure Java. property sets are mostly use to store a document's properties (title, author, date of last modification etc .), but they can be used for application-specific purposes as well.

Hpsf supports reading and writing of properties. however, with the current poi release only reading is possible. in order to write properties, you'll have to fetch the latest poi version from the CVS repository.

Please see the hpsf project page for more information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.