Skip to content
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

关于CSV文件写入数值型文本精度补齐问题 #4089

Open
qxcodefarmer opened this issue Feb 25, 2025 · 0 comments
Open

关于CSV文件写入数值型文本精度补齐问题 #4089

qxcodefarmer opened this issue Feb 25, 2025 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@qxcodefarmer
Copy link

qxcodefarmer commented Feb 25, 2025

在对CSV文件写入的时候,不足2位精度的需要用0做补齐,写入的是字符串:1.10,但是在打开CSV文件的时候(WPS,微软的excel),发现展示的是1.1。会把小数位数上的0舍弃掉。 请求如何解决这个问题。尝试过使用@numberformat("#0.00")注解,也同时尝试过使用DecimalFormat decimalFormat = new DecimalFormat("0.00#") 方式进行格式化到字符串,发现还是不行

@qxcodefarmer qxcodefarmer added the help wanted Extra attention is needed label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant