English 中文(简体)
Apache POI Word - Overview
  • 时间:2024-09-17

Apache POI Word - Overview


Previous Page Next Page  

Many a time, a software apppcation is required to generate reference documents in Microsoft Word file format. Sometimes, an apppcation is even expected to receive Word files as input data.

Any Java programmer who wants to produce MS-Office files as output must use a predefined and read-only API to do so.

What is Apache POI?

Apache POI is a popular API that allows programmers to create, modify, and display MS-Office files using Java programs. It is an open source pbrary developed and distributed by Apache Software Foundation to design or modify MS-Office files using Java program. It contains classes and methods to decode the user input data or a file into MS-Office documents.

Components of Apache POI

Apache POI contains classes and methods to work on all OLE2 Compound documents of MS-Office. The pst of components of this API is given below −

    POIFS (Poor Obfuscation Implementation File System) − This component is the basic factor of all other POI elements. It is used to read different files exppcitly.

    HSSF (Horrible SpreadSheet Format) − It is used to read and write .xls format of MS-Excel files.

    XSSF (XML SpreadSheet Format) − It is used for .xlsx file format of MS-Excel.

    HPSF (Horrible Property Set Format) − It is used to extract property sets of the MS-Office files.

    HWPF (Horrible Word Processor Format) − It is used to read and write .doc extension files of MS-Word.

    XWPF (XML Word Processor Format) − It is used to read and write .docx extension files of MS-Word.

    HSLF (Horrible Spde Layout Format) − It is used to read, create, and edit PowerPoint presentations.

    HDGF (Horrible DiaGram Format) − It contains classes and methods for MS-Visio binary files.

    HPBF (Horrible PuBpsher Format) − It is used to read and write MS-Pubpsher files.

This tutorial guides you through the process of working on MS-Word files using Java. Therefore the discussion is confined to HWPF and XWPF components.

Note − OLDER VERSIONS OF POI SUPPORT BINARY FILE FORMATS SUCH AS DOC, XLS, PPT, ETC. VERSION 3.5 ONWARDS, POI SUPPORTS OOXML FILE FORMATS OF MS-OFFICE SUCH AS DOCX, XLSX, PPTX, ETC.

Advertisements