Forums Register Login

csv produces wrong result: how to get 0607 while file shows 607

+Pie Number of slices to send: Send
I'm trying to write a simple csv file where the cell suppose to contain the text: 0607

for some reason, the csv automatically convert it into a number and the result is: 607



can anyone advise how to circumvent this issue?
thank you!
+Pie Number of slices to send: Send
println("\"0607\""); ?

This isn't really a Java question; it's a problem with the program opening the file. It needs to know to interpret the data as a String rather than as a number. Quotes might work, but so might a setting in a dialog box or "File Import Wizard" of some kind.
I RELEASE YOU! (for now .... ) Feel free to peruse this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 752 times.
Similar Threads
Data is not properly export in the csv file
Creating and Writing a file
write data from database table to a csv file
Writting into two files
PrintWriter vs FileWriter
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:52:22.