【已解决】easypoi在导出后Excel中数字不能直接求和。是文本格式。无法求和。怎么解决
- 工作小总结
- 时间:2021-05-31 14:28
- 3723人已阅读
简介
在使用EasyPoi导出Excel的时候,数字是文本格式。不能直接使用Excel的sum函数。需要手动转换成数字。解决方案:在对应字段的Excel注解中添加type=10。就可以了。使用的版本是:4.3.0。如下: cn.afterturn &n
🔔🔔🔔好消息!好消息!🔔🔔🔔
有需要的朋友👉:联系凯哥
在使用EasyPoi导出Excel的时候,数字是文本格式。不能直接使用Excel的sum函数。需要手动转换成数字。
解决方案:
在对应字段的Excel注解中添加type=10。就可以了。
使用的版本是:4.3.0。如下:
<dependency> <groupId>cn.afterturn</groupId> <artifactId>easypoi-web</artifactId> <version>4.3.0</version> </dependency> <dependency> <groupId>cn.afterturn</groupId> <artifactId>easypoi-base</artifactId> <version>4.3.0</version> </dependency> <dependency> <groupId>cn.afterturn</groupId> <artifactId>easypoi-annotation</artifactId> <version>4.3.0</version> </dependency>
参考:
https://blog.csdn.net/enthan809882/article/details/106529620/?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-1&spm=1001.2101.3001.4242
上一篇: jdk1.8 list 多条件排序
下一篇: 杂乱的记录