java实现doc转docx
1. 添加依赖或jar包
<!-- https://mvnrepository.com/artifact/com.aspose/aspose-words -->
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>18.2.0</version>
</dependency>
jar下载链接:https://pan.baidu.com/s/1203Xn9JgJ1tG6cWPkythAA?pwd=rea4
提取码:rea4
2. 使用aspose转换文件
public static void convertDocIs2DocxIs2(InputStream docInputStream) throws Exception {
Document doc = new Document(docInputStream);
doc.save("newWord.docx", SaveFormat.DOCX);
}