0

Is this possible to take delimeter other than comma for converting into CSV file....because in my scenario my gridview cell contains data with commas.

MaddY
  • 25
  • 3

1 Answers1

0

Well the 'C' in C‍SV does stand for "Comma".

That said, depending on what the purpose/destination of your "CSV" output is, I can see two options:

  • If your program is the only recipient, use whatever you like. Heck, something like the built in serialises might be easier.
  • Otherwise, follow the CSV format and double quote your values.

There is a lot a more useful information in this question, and this one.

Community
  • 1
  • 1
Fowl
  • 4,940
  • 2
  • 26
  • 43
  • Thanks Fowl.....the link you provided helps me alot.Actually i am exporting gridview data into CSV format it works fine but the problem arise when grid's column data contain Comma itself like "Calcitrol, 0.25 microgram"..now i put it in double quotes and it works fine.. thanks – MaddY Oct 25 '10 at 07:37