I was getting an error while reading the csv file can anyone help me the error is

Read CSV: The CSV file format for C:\Users\dhana_000\Desktop\HR_changes.csv is invalid. Line 2 contains more values than the header line.

Your CSV has more data than it has headers.

For instance if my CSV looks like this:

The Old Man and the Sea,Ernest Hemingway,Sold,but more incoming
The Green Mile,Stephen King,Available

This is an invalid file, because the header has 2 commas, but the second line has 3. Be sure to check your CSV for cases like this.


@Anthony_Humphries yes thank you

I am facing the same issue, is anybody having solution for the same. I did the workaround by adding semicolon at the end of column header in csv file.

As this is temporary solution, how to fix it without doing manual work.

1 Like

Always remember to check for the separator charachter used in reading the csv

Please send me your solution for adding semicolon at the end of column header in the csv file?

Instead of using read CSV activity, use read Text file activity and save it to a variable.
Now use Generate data table from text activity and in the data formatting options, select CSV.

This worked for me.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.