Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datax-cloud
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄营
datax-cloud
Commits
ce3bd70b
Commit
ce3bd70b
authored
Apr 21, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0.0项目初始化
parent
5f759cf3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
WordUtil.java
...ce/src/main/java/cn/datax/commo/office/word/WordUtil.java
+16
-0
No files found.
datax-common/datax-common-office/src/main/java/cn/datax/commo/office/word/WordUtil.java
View file @
ce3bd70b
...
...
@@ -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"
,
"测试"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment