Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you write data to a csv file if it has embedded commas?

Status
Not open for further replies.

Anddroid

Programmer
Mar 23, 2001
5
CA
I am writing data to a CSV file from ASP. The problem is that some of the data contains the comma (,) character and when you open the csv file, the comma breaks the data apart at the comma. Is there anything I can do so that the embedded comma does not get interperated as a column delimiter?
 
I end up answering my own question.

While I was waiting to hear from someone on this, I figured out a solution.

Enclose data that has an embedded comma with double quotes. This takes care of the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top