Help with my created Excel

Hi team,
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.

Link: UiPath | Files in Folder to Data Table | How to get files from folder | VB.Net | Loop For Each File - YouTube

Best regards
Mahmoud

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:

  1. Creating the data table variable at panel

  2. Build the data table schema
    2.1. Get Buil DataTable Activitie
    image

    2.2. Build datatable schema
    image

    2.3 Store the schema in your dt_Data

  1. We will create an array of string to store the path of the folders

  2. And now we will get all the Directories using Directory.GetDirectories Method, take a look!
    image

  3. 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
    image

  4. Now we need to iterate through our array of directories and add datarow activity
    6.1 The loop
    image

    6.2 The activity add Data row
    image

    6.3 the Activity properties
    image

PS.: Note for each properties (String)

  1. Now, we only need to write our data table in an excel file
    7.1 Use excel application scope activity
    image

    7.2 Lest pass the path where we want to save the excel
    image

    7.3 Use this properties

    7.4 Write the data table in this file using write range activitie

The result:
image

Like magic!!!
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…

{str_User, path.GetFileNameWithoutExtension(Str_Directory)}
1 Like

Perfect, @prasath17 !! Thanks!!!