maven地址点这里
maven构建:
<dependency>
<groupId>com.charminglee911</groupId>
<artifactId>ExcelUtils</artifactId>
<version>1.1.release</version>
</dependency>
2018.8.8 更新:
1.修改Excel导入对象时使用File参数
2.导出支持xls和xlsx两种格式
3.识别File的文件扩展名,用以决定使用哪种兼容格式
4.升级poi到3.1.7
5.注释老接口过期
6.bugfix
2018.8.7 更新:
1.导出Excel功能!!!
2018.8.5日更新:
增加注解操作,具体的例子可以从我的github工程里看,截图操作如下:

17年的故事:
项目有需求做一个读取Excel表格的数据,找了github也看到有好用的工具类,毕竟Excel不像json这么热。假期时间宽裕,正好又好久不写博客了,干脆就写一个从Excel中的数据反向生成实体对象的小工具,思想继承自fastjson这类json转换工具,下面看Excel表
第一种是中文的属性名

第二种是英文网的属性名

假设对象为Person

项目功能演示

项目功能演示(旧版本)

点击这里 获取完整项目代码。
网友评论