Open Microsoft Word docx file using Java

How to open Microsoft Word docx file in Java? Also, how can I open it if it is password protected?

For instance,

File f = new File("hello.docx");

Please try not to respond to things like "you should not do this." I have a good reason for this, so please stick to the question when you answer. Thank you so much!

+3
source share
6 answers

There is an Apache POI project for working with MS Office files. A DOCX file is just a zip file with several XML files inside, so you can unzip the file and work with XML. The XML specification (Open XML) is known.

+5
source

, , Apache POI : http://poi.apache.org/

+3

docx4j Apache POI, .docx, .docx4j. .docx.
: http://java.dzone.com/articles/create-complex-word-docx , .docx docx4j.

+2

docx , zip . . . Office Open XML

Java, POIFS. POIFS POI (docx4j , , docx4j, API POIFS)

, docx4j POI.

: , docx4j docx.

+1

, Open Office api? .

MS Excel.xls( ).

, .

0

All Articles