Create file and folder using excel data

Hello, evryone
I am new to the forum and uipath studio.
I have an excel file in which there are a few dozen columns and rows. I want to create one folder and file per row of one specific column and name the folders and files after the content of the corresponding row. Any ideas?

Hi @venkatesh28,

Welcome of the community

For folder creation you can use Create Directory activity

For excel You can use Write Range activity and enter the path of the file if file exist then good if not UiPath will create one.

Hope it helps!!


Welcome to uipath community
Hope these steps would help you resolve this
—use excel application scope and pass the file path as input
—use a read range activity and get the output with a variable of type datatable named dt
—now use a for each row activity and pass dt as input
—then inside the loop use create directory activity where mention the path like this
So that director with folder created under the column name
—followed by this use a excel application scope and mention the file path as “Yourfolderpath\”+dt.Columns(“yourcolumnname”).Columnname.Tostring+”\”+row(“yourcolumnname “).ToString+”.xlsx”**
so that it will create a excel file we want in that folder created we have created in the last step

Cheers @venkatesh28

thank you,it worked.Now i have about 15 files and i want to move them to different folders based on their names can it be done.

Yes of course that’s possible
Hope these steps would help you resolve this
—use a assign activity like this
arr_filepath = Directory.GetFiles(“yourfolderpath”,”*.xlsx”)

Where arr_filpath is a variable of type array of string

Then use a for each loop and pass the above variable as input and change the type argument as string in the property panel
—then inside the loop use MOVE FILE activity where in the path property mention as item.ToString and in the destination mention the folder path where you want to move that file

Cheers @venkatesh28

Thank you for your replies.
Actually,i have sevral text files around 15 and i want to move them to 5 different folders based on their names can it be done.

Yah it can be
May I know the process like how and which are tone moved
Cheers @venkatesh28

hi, there are about five text files with(for ex:rajesh,kiran.etc) different names and i would like to move those files to different folders which i have created with same names.