How do I ignore the first row of a CSV when using Read CSV

I am trying to merge a bunch of CSVs that I have downloaded from a site into a single CSV file. However, when I try to read the CSVs, I get hit with an error saying that the file format is invalid.

As it turns out, this is because every CSV that I downloaded contains a title for the CSV in the first line, and the Read CSV activity is not able to ignore this. See below image. When I manually go into the CSV and delete this said title line, Read CSV is able to properly read the CSV and all the contents.

Since I cannot use Read CSV without removing this line first, how do I get UiPath to read all of my CSVs? I have upwards of 1000+ CSVs, so manually erasing the first line from every one isn’t a very good option. If there is a way for UiPath to automate this task, that would work, or to have Read CSV somehow ignore this first line for each CSV it tries to read.

Thank you very much.

1 Like

Hi @Jfu ,
Firstly create a task for removing 1st row or 1st cell(It’s upto your choice) from csv. It makes your work simplier. :slight_smile:
Best Regards,
Likith Rajesh.Query


Good afternoon @Jfu

Does this solution resolve your issue?


Hey Likith, thanks for the response. I tried this, and unfortunately it doesn’t work because the function Read CSV can’t even access the CSV since the first line blocks it from doing so. As a result, I can’t even get a table table in the first place.

Here the WorkFlow is PFA.
Best Regards,
Likith Rajesh.
Sample.xaml (4.1 KB)

1 Like

@likith_rajesh Usually when we read this file we would face error as mentioned unless it has a comma in its string so we won’t be able to read and use remove data row from it

If the row starts from 5th row in the excel with headers (for sure) then we can simply use EXCEL APPLICATION SCOPE where we can pass the CSV file path as input aS well
—use Read Range activity inside the scope and mention the range as “A5” so that it would start to read from fifth row
And make sure that the property ADD HEADERS in the property panel of Read Range

Hope this would help you
Cheers @Jfu

1 Like