Open Microsoft Word docx file with Java

后端 未结 6 1848
灰色年华
灰色年华 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:22

    I have used both docx4j and Apache's POI libraries, if you are working with .docx I would recommend .docx4j. Automated alot of the process of creating a .docx.
    There is a great exmaple here : http://java.dzone.com/articles/create-complex-word-docx on how to create a .docx using the docx4j package.

提交回复
热议问题