Hi
I want to read the CSV file. I’m using the READ CSV activity but getting error
Error: “Read CSV: The CSV file format for Communication File\data.csv is invalid. Line 2 contains more values than the header line.”
I’ve attached the csv file below.
Hi
I want to read the CSV file. I’m using the READ CSV activity but getting error
Error: “Read CSV: The CSV file format for Communication File\data.csv is invalid. Line 2 contains more values than the header line.”
I’ve attached the csv file below.
Hi,
Can you try as the following?
First, read csv file as string using ReadTextFile activity.
Next remove the first line of the string using the following expression.
strCsv = System.Text.RegularExpressions.Regex.Replace(strCsv,"^.*\n","")
Finally, convert it to DataTable using GenerateDataTable activity with CSV option.
Regards,
You can also try below steps
Read csv file as string using Read Text File activity.
Generate datatable from the string using Generate DataTable activity with csv parse option and Use Column Header option.
I’ve tried this scenario and its working. In this case no need to use assign activity. Directly convert sting to DataTable variable easily.
Thank you!!
its working fine.
Thank you!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.