Arasu
Arasu

Reputation: 2138

Convert dot to dotx in JAVA

I have a .dot file using which i will be creating doc file with values replaced.

eg: .dot file having <claimId>

I will replace <claimId> with real claim Id say 1234 and generate a doc file. I am using Apache POI HWPFDocument, when using HWPFDocument i am getting issues when i replace text inside table.

So i tried XWPFDocument i can feed only .dotx files.

I have no issue when using dotx file with XWPFDocument and successfully generated docx files. Now i need to convert .dot files to .dotx files from java. Can someone help me on this...

Upvotes: 0

Views: 624

Answers (1)

centic
centic

Reputation: 15872

There is no automated way to do this conversion in Apache POI as far as I know.

You can manually convert .dot files to .dotx by opening the file in Microsoft Word and saving it in the newer format.

Upvotes: 1

Related Questions