Export to CSV - C #

I need to export the general list to CSV. Obviously, I could write my own, but would like to avoid this!

I can google and find many CSV parsers, but not many writers. I downloaded FileHelpers, but it does not cope with the exit.

For example, if the field is

,,",,,

the conclusion is simple:

,,",,,

For the field. I would expect:

",,"",,,"

correctly?

Any suggestions, or should I do it myself?

+3
source share
4 answers

Take a look at RFC 4180. I had to write XSL to convert XML to CSV, and this made it very easy to understand what to do.

http://tools.ietf.org/rfc/rfc4180.txt

+4
source

FileHelpers , FieldQuoted .

+4

, , . .

+3

CsvHelper Josh Close csv. CsvHelper , .

() / , .

0

Source: https://habr.com/ru/post/1724539/


All Articles