Line contains more values than the header line

Hello,

Does anyone have a solution for this problem? It is important that we only need to use a CSV file and not an Excel file. I am using ‘Read CSV’ activity, but I get the following error message: ‘The line contains more values than the header.’


image

1 Like

@Mansi_Shinde

the csv format might be different

one way you can try is read using read text file and then use generate datatable from text activity

cheers

1 Like

@Mansi_Shinde,

You will have to add some dummy column headers on first line of the csv file.

  1. read the text file,
  2. split it by new line,
  3. get the first line,
  4. suffix random column names at the end,
  5. add this newly created column header line to the remaining data.
  6. Now save this data into the CSV file
  7. Read this CSV file
2 Likes

Instead of comma as a delimiter, I used the tab character as a delimiter. The error has now been fixed.
Thank you very much for the solutions!
Happy automation!

1 Like

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