Commit ce3bd70b by yuwei

2.0.0项目初始化

parent 5f759cf3
......@@ -121,6 +121,22 @@ public class WordUtil {
System.out.println("共耗时:" + ((now - old) / 1000.0) + "秒");
}
/**
* 创建空文档
*
* @param destPath 文件路径 F:\\test\\审批流提交.docx
* @return
*/
public boolean newWord(String destPath) {
try {
Document doc = new Document();
doc.save(destPath, SaveOptions.createSaveOptions(SaveFormat.DOCX));
return true;
} catch (Exception e) {
return false;
}
}
public static void main(String[] args) throws Exception {
Map<String, Object> map = new HashMap<>();
map.put("companyName", "测试");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment