Skip to content

Can you read from a csv transformed into a string? #1778

Answered by JoshClose
madquantum81 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes. CsvHelper takes in a TextReader. You can use a StringReader for your TextReader.

var reader = new StringReader(text);
var csv = new CsvReader(reader, config);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@madquantum81
Comment options

Answer selected by madquantum81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants