Create Folders According to Excel Sheet Name

Im working on an automation where i have a excel file with multiple sheets. Im pulling
Book1.xlsx (11.0 KB)
the information from the sheets and retrieving information from a database. I want to create folders that are the same as the sheet name, so when I pull the information from the database i can save into that folder that corresponds with the sheet name. I have attached a simple excel file with 5 sheets. How would i create separate folders for each name according to the sheetname in the excel file?


First you have to put Excel application scope and choose the excel file you want retrieve sheet name
then put get worksheets activity inside excel application scope to get worksheets activity and create a variable in sheet tab

use for each activity to iterate excel sheets and pass get worksheets activity output variable in In Tab
put the create folder activity inside for each activity to create folder for all the sheet names
Enter destination location like "D:"+Item.ToString it will create folders in D:\Sheet1 , D:\Sheet2 like this

Have a look at below image for more reference

Hope it solves your issue
Update us whether you got your desired solution or not

Nice work this is what i was looking for, Is there a way to also create text files according to the sheet names? We made folders according to sheet names, is there a way to also create text files in those folders?

Use write text file activity and put int inside for each activity
Enter file path as same as above
And give a str value or variable to write into that file



You wrongly marked your reply as solution kindly change it if my suggestion helps you out …


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