Closed omerbrandis closed 2 years ago
hello,
I'm trying to use this lib on a csv that has its header on the second row ( ubuntu 16, csv parser version 2.1.3 )
csv::CSVReader MyCsvReader(FileName) for (auto & CurrentCsvRow: MyCsvReader) { std::cout << "read row "<< std::endl; }
writes the expected number of rows to sysout ( = the number of rows in the file)
but
csv::CSVFormat Format; Format.header_row(1); csv::CSVReader MyCsvReader(FileName.Format) for (auto & CurrentCsvRow: MyCsvReader) { std::cout << "read row "<< std::endl; }
only writes one row to stdout.
any ideas ? thanks, Omer.
adding Format.variable_columns(csv::VariableColumnPolicy::KEEP); solved the problem for me. :-)
hello,
I'm trying to use this lib on a csv that has its header on the second row ( ubuntu 16, csv parser version 2.1.3 )
writes the expected number of rows to sysout ( = the number of rows in the file)
but
only writes one row to stdout.
any ideas ? thanks, Omer.