Ekrem Tapan

Ekrem Tapan

  • NA
  • 967
  • 81.2k

Reading CSV with comma placed within double quotes?

Oct 28 2015 4:21 AM
Hi all,
I was able to parse and import .CSV file into database, but is having problem parsing .csv file that have comma contained within double quotes. For example,
"XX","XX XX","04011","XX XX XX","XX","XX,XX","XX","XX","XX","20141003 18:54","20141003 20:18","20141003 23:18"
When I parse the above line, "XX,XX" got insert to another column due to the comma in it.
 
What do I need to do to parse that as a single field for everything that contained within quotes? I'm working on a C# website by the way.
Thank you very much.

Answers (4)