This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
and I am getting the commas (,) as you described. Now, what you are saying is this: if you find 2 consecutive commas - the cell is null. EXCELLENT! THANKS
you also mentioned, and you were right, a problem with "GATES, BILL",
what if I recieve the file as is (I cant change it) and the cell contains the value: GATES, BILL (not "GATES, BILL")
how would you recomend reading the value as GATES BILL (no comma) thanks Stan
Joined: Jan 29, 2003
I don't know if CSV is a real standard or just common convention but I'd think a cell containing a comma that isn't escaped or quoted or something is just plain wrong. For my own work with CSV (not in Java) I used Excel save-as-CSV to generate test cases and to serve as the standard. Again, finding an established library would be the best bet here, if maybe not quite as educational and fun to write.