I’ll try explaining my problem in english, because i’m learning. I don’t have experience with UIPATH, and I want to create an excel with names of files. Attach a picture
Please watch this video to learn how to get the files from a folder and save them to Excel. I think it is what you search for.
Hey, Maria! How are you? Lets do this!!!
First, I create a sample like yours to demonstrate our work here.
Let’s go to the studio! To list all these folders, we need to know the path these folders are in (“C:\UiPath Test” in my case), so we create a string variable to store our path:
Now we need to create a data table variable which is where we will make our data to write in Excel:
Creating the data table variable at panel
Build the data table schema
2.1. Get Buil DataTable Activitie
2.2. Build datatable schema
2.3 Store the schema in your dt_Data
We will create an array of string to store the path of the folders
And now we will get all the Directories using Directory.GetDirectories Method, take a look!
Now, we will get the username as the picture you send.
5.1 Create a string variable
5.2 Get the current Logged Username using this System Method
Now we need to iterate through our array of directories and add datarow activity
6.1 The loop
6.2 The activity add Data row
6.3 the Activity properties
PS.: Note for each properties (String)
Now, we only need to write our data table in an excel file
7.1 Use excel application scope activity
7.2 Lest pass the path where we want to save the excel
7.3 Use this properties
7.4 Write the data table in this file using write range activitie
I hope it helped you!!!
@gabrielribas4 - Just one small suggestion…Since @maria.rosa.pg92 wants to writes only the folder name without the path name , you have to use as shown below…It will not write the full path in the column B now…
Perfect, @prasath17 !! Thanks!!!