I am fairly new using FileHelpers Class for parsing the CSV. I have a file like this...
"background","Info","Agent abcdefg
===================
Context Tenant: {Vendor: 1, Customer: 719046046}","2,140.69","","7/11/2017 3:30 AM"
I would like to ignore any newline and would like to read that as one string. Can you please help?
so at the end of the line it is \r\n and i want this to be removed.
You can use [FieldQuoted] like this:
public class YourRecordClass
{
[FieldQuoted()]
public string Field1;
[FieldQuoted()]
public string Field2;
[FieldQuoted(QuoteMode.OptionalForBoth, MultiLineMode.AllowForBoth)]
public string Field3;
[FieldQuoted()]
public string Field4;
[FieldQuoted()]
public string Field5;
[FieldQuoted()]
public string Field6;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With