• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!