Loop through all workbooks AND all worksheets in excel

I have a folder with 10 excel worksheets. Each worksheet has a random amount of tabs.

I need to loop through each file and each worksheet and perform the same formatting/tasks.

I can get two nested For Each to loop through and output each worksheet name.

I do not want to use a macro because the formatting I’m looking to do is going to be dynamic based on a configuration file and I think UiPath does that better.

But I’m having trouble then getting an excel scope to do the formatting, it opens first file but then says “range does not exist”.

Is there an easier way to get UiPath to do this?


Hi @db44

Check the below .Xaml File as it goes through each Excel File stored with in the folder and also each and every worksheet within each Excel File.
Main.xaml (8.8 KB)


Hope this workflow may help you to solve your query
Mark as solution if this helps you and like it :innocent:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like