How do I read data from multiple CSV to different Excel files

Hi All,

Thank you in advance for helping me out on my query.
I have a requirement where I have multiple CSV files downloaded from a web service and I need to write the data in these files to different excel sheets.
File 1.csv to A.Xls, 2.csv to B.xls and so on, the file CSV and XLS file names are dynamic in nature.
I am stuck at creating a loop wherein 1.csv is read and wrote to A.xls and then continue with the next file.

Can one you kindly help me out in how I can get this created?


@Prithvi_P_M Can you check this Snippet :

1 Like

@supermanPunch Thanks for that. However I need to copy to a existing excel file which has few other tabs already. This file has multiple tabs and out of which i am updating a single tab from the csv file.
I can do this when it is 1 csv file, but stuck at updating multiple csv files to different excel files.

@Prithvi_P_M I guess you could use the same logic implemented in the Snippet except that you would need to modify the Excel Path and Sheet Name provided in the Write Range Activity.

Does the tab already exist in Excel and you want to Update that or you want to Create a new Sheet in the Excel with the CSV data?

@supermanPunch the tab already exists. Will give this a try and let you know

@Prithvi_P_M If the tab already exists that would mean you need to use Append Range instead of Write Range