Open Microsoft Word docx file with Java

后端 未结 6 1852
灰色年华
灰色年华 2021-01-20 15:46

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

For instance,

File f = new File(\"hell         


        
6条回答
  •  [愿得一人]
    2021-01-20 16:09

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

提交回复
热议问题