Is it possible to append ranges from workbooks with varying sheet names?

Hello,

I am trying to create an automation where a bot will go into a specified folder and run through a for each file loop and consolidate the data from each Excel workbook into one main file. The data in each workbook is formatted the same, I just need to consolidate all the rows in each file into one main file. I have the for loop and append ranges created. My issue (as far as I can tell) is that the sheet names are all different, so when the bot runs it tries to find “Sheet 1” when there isn’t one. The sheet names are essentially the same as the workbook names, only there are one or two letters chopped off at the end (see below screenshot). Is there a way in StudioX to specify the specific sheet for each file so that the append range will pick up the data and append it to the main workbook?

image

hi @Hauncho

Are there a lot of sheets present inside a single excel file or is there a chance that there could be more??

You can use For each Excel sheet:
image

and read range. and append it in some other file.

Hope this helps!

Happy Automation! :smiley:

1 Like

That’s actually just the solution I needed! Luckily there’s only one sheet for each file, I didn’t think of nesting a for each sheet function inside though. All the data is now flowing into the main workbook, thanks so much for the help!

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