当前位置: 动力学知识库 > 问答 > 编程问答 >

When I am writing data to a CSV file thorough java few columns show improper data?

问题描述:

So I am actually writing data to a CSV file through java. Now one of the column has value "047669602100001" and when it is written to the csv file it is showing as "4.76696E+13". I am sure that it is because of the column width. When i double click on that row it shows me the original record.

Is there anyway that I could follow to avoid this behavior?

网友答案:

This isn't java's behavior.

047669602100001 is being written to the CSV file properly. The program you are using to view it will see this as a large number and put it into scientific notation for display purposes. If you open the CSV file with a text editor you'll see that the correct value is actually recorded.

分享给朋友:
您可能感兴趣的文章:
随机阅读: