SimpleDocument - Apache POI Word Document Example

Q

What is SimpleDocument example in the Apache POI package? How to run SimpleDocument example?

✍: FYIcenter.com

A

SimpleDocument example in the Apache POI package is created by Yegor Kozlov. It is a simple Word document in *.docx format created by POI XWPF API.

SimpleDocument example uses the OpenXML Word Processing Format (XWPF) API, which supports Word document in *.docx format only.

Here is the command to run SimpleDocument to generate Word document in *.docx file format compatible with Microsoft Word 2007 version.

C:\fyicenter>c:\local\jdk-1.8.0\bin\java 
   -cp .;C:\local\poi-3.15\poi-examples-3.15.jar;
         C:\local\poi-3.15\poi-3.15.jar;
         C:\local\poi-3.15\poi-ooxml-3.15.jar;
         C:\local\poi-3.15\ooxml-lib\xmlbeans-2.6.0.jar;
         C:\local\poi-3.15\lib\commons-collections4-4.1.jar;
         C:\local\poi-3.15\poi-ooxml-schemas-3.15.jar 
   org.apache.poi.xwpf.usermodel.SimpleDocument

If you open the output file, simple.docx, in Word, you will see some simple text displayed in differnt styles:

Apache POI Word Document Example - SimpleDocument
Apache POI Word Document Example - SimpleDocument

 

SimpleTable - Apache POI Word Document Example

Apache POI Components for Word Documents

Apache POI Examples for Word Documents

⇑⇑ FAQ for Apache POI (Poor Obfuscation Implementation)

2017-02-22, 2155🔥, 0💬