I have a requirement to export a dataset as a CSV file.
I have spent a while searching for a set of rules to go by and realised there are quite a few rules and exce
I found this important link which is quite neat. Haven't tried it yet, will let you know how it goes!
http://www.codeproject.com/KB/linq/LINQtoCSV.aspx
Looking more closely, this implementation essentially only uses basic rules too:
special chars = \n \" and the separator char.
if found special characters, then surround with quotes. Replace quote with double quote.
Essentially the rules Chris mentioned. I think the easiest way to do this is to create my helper method based on the simple rules and revise on a user-needs basis.