-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
数据经过导入-处理-导出后精度丢失 #2595
Comments
poi数据类型的单元格是double类型,而其精度是15~16位数字,所以丢了精度 |
对的哇,不知道这种场景有什么好的办法 |
除了变成文本,也不太清楚还有什么奇技淫巧 |
大佬你是官方开发人员么,可以帮忙再想想不 |
|
太不容易了,研究了好久的源码,终于有了最优解!关闭啦~ |
Chen哥 如果是使用 |
异常代码
异常提示
![image](https://user-images.githubusercontent.com/35759818/179401164-5f3f857d-b14a-481d-a7ab-123a9e409f87.png)
![image](https://user-images.githubusercontent.com/35759818/179401208-d46cf7c0-fb7d-4c9b-b53a-243f4cd5d3e7.png)
![image](https://user-images.githubusercontent.com/35759818/179401235-7ddbdb13-4333-4aed-8485-0b319e9536e2.png)
1、导入文件格式如下图,可以看到展现的值与实际的值不一样,为了读取实际值我采用BigDecimal 去读
2、经过处理后,用同样的dto去导出,如下图,可以看到后面精度已丢失
3、为了解决这种问题,我采用切换dto的方式,将字段类型换成String去写入,导出结果如下图,可以看到这样结果是对了,但是涉及大量的dto copy,影响效率,而我如果采用String去读的话,又只会读取展现的值,读取的数据会丢失精度,请问对于这种场景有什么好的解决办法么?
建议描述
The text was updated successfully, but these errors were encountered: