Open CSV files

Hi all, I’m new using UiPath and I need to download 34 csv files from a web page. Once they are downloaded I need to delete the extra columns and save them with the same name (each file has a different name) in excel format.
Can someone guide me in how I can open each file, delete the extra columns and save each file with its name in excel format?
Thanks in adv.

Hi Gloria,

There is a activity in UIPath , ReadCSVFiles .

You can use that and convert it to excel format .
And using Remove Data Column Activity u can remove extra columns which you want to

Thanks and Regards
Sahil Garg

Hi @Sahil_Garg
Thanks for your response. I tried it and it worked for a single file, because in the file path I indicated the file name, but, not sure about the path that I need to use for getting all the files without adding the file name, and to save them. For instance, I’m using the following path to open “C:\Users\CSV\LEGAL PUBLISHING CHILE.csv” and the path of “C:\Users\CSV\LEGAL PUBLISHING CHILE.xlsx”

Hi Gloria ,

Suppose your all CSV files are saved in one folder with name - CSVfiles.

Use directory.getfiles(Path of folder,".CSV"). This will return you an array of all csv files present in that folder .

And after then use for Each loop and Use Read CSV activity.
Just put an Time Stamp on Excel name file so that every excel file has a unique name .

Thanks and regards
Sahil Garg

Thanks so much @ Sahil_Garg

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