ChoETL CSVWriter is not handling double quotes correctly.
See original GitHub issueWhen a string has a Double Quote Char it needs to be doubled up…
class EmployeeRecSimple
{
public int Id { get; set; }
public string Name { get; set; }
}
static void Main(string[] args)
{
List<EmployeeRecSimple> objs = new List<EmployeeRecSimple>()
{
new EmployeeRecSimple() { Id = 20, Name = "John Smith" },
new EmployeeRecSimple() { Id = 21, Name = "Jack in \"Da Box" }
};
Console.WriteLine(ChoCSVWriter.ToText(objs));
Console.ReadLine();
}
the output is:
20,John Smith
21,Jack in "Da Box
the second line needs to be change to…
21,"Jack in ""Da Box"
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Adding double quotes to string while writing to csv c# - ...
So when you add double quotes to the field, CsvHelper recognizes that the whole field needs to be enclosed in double quotes and...
Read more >Cinchoo ETL - CSV Reader
It is a code based library for extracting data from multiple sources, transforming, and loading into your very own data warehouse in .NET ......
Read more >Cinchoo ETL – CSV Reader - WordPress.com
This article talks about using CSVReader component offered by ChoETL framework. It is a simple utility class to extract CSV data from file ......
Read more >To Remove double quotes in CSV file by CSVWriter
Description : Constructs CSVWriter with supplied separator, quote char, escape char and line ending. By default, CSV values are separated by ,.
Read more >How to read CSV files in C# character ...
If you want to remove all double quotes, simply select the entire worksheet, then go to the Editing group of the Home tab...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
U must use
QuoteAllFields()
when loading csv fileYeah, it work for me, thank you!