-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sushengren/master
Master
- Loading branch information
Showing
1 changed file
with
66 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,80 @@ | ||
# easyworl | ||
# JAVA解析Word工具EasyWord | ||
|
||
#### 介绍 | ||
{**以下是 Gitee 平台说明,您可以替换此简介** | ||
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 | ||
无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} | ||
基于Apache poi封装,在上层做了模型转换的封装,让使用者更加简单方便 | ||
|
||
#### 软件架构 | ||
软件架构说明 | ||
|
||
依赖: | ||
1. poi:4.1.2 | ||
2. poi-ooxml:4.1.2 | ||
|
||
#### 安装教程 | ||
|
||
1. xxxx | ||
2. xxxx | ||
3. xxxx | ||
``` | ||
<dependency> | ||
<groupId>com.sushengren</groupId> | ||
<artifactId>easyword</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
``` | ||
|
||
#### 使用说明 | ||
|
||
1. xxxx | ||
2. xxxx | ||
3. xxxx | ||
##### 简单使用 | ||
![word模板文件](https://images.gitee.com/uploads/images/2020/1228/110223_353ac411_2130627.png "屏幕截图.png") | ||
|
||
``` | ||
public class TestEntity { | ||
@WordProperty(value = "文物名称") | ||
private String value1; | ||
@WordProperty("文物级别") | ||
private String value2; | ||
@WordProperty("总登记号") | ||
private String value3; | ||
@WordProperty("分类号") | ||
private String value4; | ||
@WordProperty("档案编号") | ||
private String value5; | ||
@WordProperty("年") | ||
private String value6; | ||
@WordProperty("月") | ||
private String value7; | ||
@WordProperty("日") | ||
private String value8; | ||
#### 参与贡献 | ||
@WordProperty("制档人") | ||
private String value9; | ||
1. Fork 本仓库 | ||
2. 新建 Feat_xxx 分支 | ||
3. 提交代码 | ||
4. 新建 Pull Request | ||
@WordProperty(value = "图片", handle = PictureFillTypeHandle.class) | ||
private InputStream img; | ||
// 省略getting,setting | ||
} | ||
``` | ||
``` | ||
TestEntity testEntity = new TestEntity(); | ||
testEntity.setValue1("北宋“富”字大狮子绣球藤花纹绫"); | ||
testEntity.setValue2("一级"); | ||
testEntity.setValue3("T0001"); | ||
testEntity.setValue4("F0001"); | ||
testEntity.setValue5("DA00001"); | ||
testEntity.setValue6("2020"); | ||
testEntity.setValue7("12"); | ||
testEntity.setValue8("24"); | ||
testEntity.setValue9("杰克"); | ||
testEntity.setImg(new FileInputStream(new File("C:\\Users\\AD\\Pictures\\01.jpg"))); | ||
#### 特技 | ||
File file = new File("C:\\Users\\AD\\Desktop\\CollectionFile.docx"); | ||
FileOutputStream out = new FileOutputStream("C:\\Users\\AD\\Desktop\\CollectionFile1.docx"); | ||
EasyWord.of(file).doWrite(testEntity).toOutputStream(out); | ||
``` | ||
|
||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md | ||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) | ||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 | ||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 | ||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) | ||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) | ||
![文档输出](https://images.gitee.com/uploads/images/2020/1228/110502_27e979df_2130627.png "屏幕截图.png") |