MikeStall / DataTable

Class library for working with tabular data, especially CSV files
Apache License 2.0
150 stars 63 forks source link

Generating CSV, if Data Contains double quotes in it, corrupts the csv. #61

Open usmanadnare opened 2 years ago

usmanadnare commented 2 years ago

for example if result set has a name field and data is something like: Name | DateOfBirth Doe, Joe "M" | 1990-04-01 Doe, Joe F" |1993-04-01

this tool will wrap all fields in one column like this: Name,DateOfBirth "Doe, Joe "M"", 1990-04-01 "Doe, Joe F"", 1993-04-01 image

usmanadnare commented 2 years ago

a simple solution is to replace all the double quotes(") in the data with double double-qoutes (""). I don't know it this will be an optimized one, but that's what I had to do on my end for the time being.