ben-strasser / fast-cpp-csv-parser

fast-cpp-csv-parser
BSD 3-Clause "New" or "Revised" License
2.11k stars 440 forks source link

Doesn't work if a cell contains comma #46

Closed trehman65 closed 7 years ago

trehman65 commented 7 years ago

a,b,c 1,"23,3",44 23,545,56

I get libc++abi.dylib: terminating with uncaught exception of type io::error::too_many_columns: Too many columns in line 2 in file "/Users/talha/Coding/ClionProjects/pricerightnlp/test.csv".

ben-strasser commented 7 years ago

Hi,

thanks, for your feedback. Why does the example from the documentation not work for you?

Examples: CSVReader<4, trim_chars<' '>, double_quote_escape<',','\"'> > reads 4 columns from a normal CSV file with string escaping enabled.

Best Regards Ben Strasser

tuanhtrng commented 7 years ago

Hi @ben-strasser,

I tested your example and it worked as intended.

DonaldTrump88 commented 7 years ago

Thanks @trehman65 and @ben-strasser I am interested in knowing import of CSV cells which have commas inside and enclosed by "". Did you above mentioned example work? a,b,c 1,"23,3",44 23,545,56

ben-strasser commented 7 years ago

You asked with "Did that work?" after someone wrote in the exact post before yours "That works". What answer do you expect?