How to convert doc to docx using Tika or POI?

2019-07-21 23:30发布

问题:

Can Anyone help me to convert a .doc file to .docx using apache Tika or with apache POI? I tried a lot of ways but stuck in converting the document to docx format.

Help is appreciated.

Thanks and Regards, Arun R S

回答1:

I am doing this recently.

And I use aspose words to convert .doc to .docx.

Very convenience.

Document doc = new Document(filePath);
doc.save(descFilePath);

Just two lines.