Line contains more values than the header line uipath


I’ve searched a lot here on the forum this issue, but I couldn’t find a solution.

I have this title error

“line contains more values ​​than the header line.”

How do I get this error resolved?

may we ask you to share some more details with us. e.g.which activity is throwing the error.

Maybe it is coming from a missmatch of schema and values

to explain, what i really need to do is convert a csv file to xlsx (already tried changing the file extension but it gets corrupted)

continuing… I’m trying to convert the csv file to xlsx with the “read csv” and “write range” activity

in “read csv” I put where is the spreadsheet in csv. but the mentioned error appears, “line contains more values ​​the header line”

I would like to know how I solve this

I would be very grateful if you could help me

had already answered your other topic

ths CSV file is not valid in its structure
there is a difference between first line expressing the column headers and the datalines.
There is 1 or more rows having a different amount of columns comparered to defined column headers.

Corrections if csv popilating source cannot provide a correct one:

  • manually correction
  • correction automated / by Code

But first of all you should find out which lines are having the defect and what are the details.
In case of less datarows just inspect the CSV file in an editor e.g. notepad++

Also check that the delimiter line is correct specified

in the case of the mentioned code, would it be code in the uipath itself, or in the spreadsheet with macros?

I thought it would be easier, but by the way it won’t be

Thank you for clearing that up

As csv is not Excel, macros are not / less to prefer.
we would model some flow with using activities and / or .Net Api usage calls for corrections.

However did you find the lines which are mismatching the structures?

1 Like

excel csv.xlsx (77.7 KB)

I couldn’t identify, I think it’s all right

I had to manually convert it to xlsx to forward it here, but it’s the same file only q in csv

csv is about tabular format:

here we do see a missmatch

Maybe you can share also your initial CSV file which was never opened in Excel before? thanks