Hi,
Creating a CSV file in a winforms application, it is to be improted into Excel.
The file output looks like:
"header1", "header2", "header3", 1,2,3, 4,5,6
What should I use to signify a newline character when generating the CSV file?
Hi,
Creating a CSV file in a winforms application, it is to be improted into Excel.
The file output looks like:
"header1", "header2", "header3", 1,2,3, 4,5,6
What should I use to signify a newline character when generating the CSV file?
I generally stick with "\n" - because it will be "correct" for the platform on which it is used.
While there are various specifications and implementations for the CSV format (for ex. [4], [5], [6] and [7]), there is no formal specification in existence, which allows for a wide variety of interpretations of CSV files. This section documents the format that seems to be followed by most implementations:
Each record is located on a separate line, delimited by a line break (CRLF). For example:
aaa,bbb,ccc CRLF
zzz,yyy,xxx CRLF