FileHelpers icon indicating copy to clipboard operation
FileHelpers copied to clipboard

CsvEngine.CsvToDataTable() removes outer quotes except for first column

Open Raphael360 opened this issue 9 years ago • 2 comments

Hi, Firstly: thanks for FileHelpers, it's a very helpful library!

Secondly: I'm currently experiencing an issue very similar to the one in: https://github.com/MarcosMeli/FileHelpers/pull/15

I'm using the code below to load a csv file in a datatable: CsvOptions options = new CsvOptions("Dummy", ',', numberOfColumns, 0); return FileHelpers.CsvEngine.CsvToDataTable(file, options);

It works fine except for file where fields are double quoted: "field1","field2","field3"

Once in datatable, the quotes are gone for field2 and field3 but not for field1. Is there a fix or a workaround for this issue?

I'm using FileHelpers 3.1.5.0

Best regards.

Raphael360 avatar Mar 23 '16 07:03 Raphael360

I tested this locally and verified that this bug exists. I'll take a look at fixing it.

jboyer2012 avatar Feb 01 '17 01:02 jboyer2012

Hi Justin

Are you working on this one? I think cleaning / updating the issues would be beneficent for the project.

Thanks for your answer, Matthias

mcavigelli avatar May 30 '18 19:05 mcavigelli