Loop through a folder filled with excel files and Vlookup to a main spreadsheet

Hi everyone, i am currently facing a problem with uipath studio.

My objective is to ulitmately use uipath studio to automatically go through a folder filled with excel files and in each excel file i want it to be ‘vlookuped’ to my main excel spreadsheet.

Which means for example, I have folder A, which is filled with A1 to A10. I want each of the files to be opened sequentially and be ‘vlookuped’ to B, the main excel spreadsheet and it has to be done horiziontally which means e.g. the vlookup value in the main excel spreadsheet is in I3 for A1, till A10 it should be I3 to R3.

I have solved the issue of doing one excel file to the main excel spreadsheet but looping through it is the difficult part.

Hope it does not sound super confusing but if you need clearer explainiation i would do so!

Thanks a million

try this loopExcel.xaml (7.7 KB)

Directory.GetFiles(“folderPathHere”) ← here you can mention, which folder needs to be looped for all excel files

you can increment from I to R inside the loop for the vlookup

Thanks! I will do it tomorrow and get back if there is any errors.

1 Like