Template file properties are used in Excel files

Please help,

I have an Excel file “Excel Template” that I want to fill out

  1. Column A8 : C1000 will be filled with data from CSV
  2. Columns E1:K10 will be filled with images that I have in the Image folder
  3. Column E12 : K20 will be filled with a circle pivot graph obtained from the data in column A8:C100

Once finished it will be saved in a folder and given a name according to Excel “ListAccount” in the “Subaccount” column

The “Excel Template” file will loop according to the data in the “LisAccount” file

How to create a project like the flow above, so that the “Excel Template” file can run well?
Excel Template.xlsx (10.3 KB)
ListAccount.xlsx (9.3 KB)

@Kia1,

You can use the following steps:

  1. Read data from the “ListAccount” file to get the list of accounts.
  2. For each account in the list: a. Read data from the CSV file. b. Read images from the “Image” folder. c. Generate a circle pivot graph based on the data from the CSV file. d. Fill the Excel template with data from the CSV file, images, and the generated pivot graph. e. Save the filled Excel template with a name according to the account’s “Subaccount” column.
  3. Repeat the process for each account in the list.

Here’s a more detailed breakdown of the steps:

  1. Use the “Excel Application Scope” activity to open the “ListAccount” file.
  2. Use the “Read Range” activity to read the data from the “ListAccount” file into a DataTable variable.
  3. Use a “For Each Row” activity to iterate through each row in the DataTable variable obtained in step 2.
  4. Within the loop, perform the following actions: a. Read data from the CSV file using the “Read CSV” activity. b. Use the “Directory.GetFiles” method to get the list of image files in the “Image” folder. c. Use the “Excel Application Scope” activity to open the “Excel Template” file. d. Fill the Excel template with data from the CSV file using the “Write Range” activity. e. Insert images into the specified columns using the “Add Image” activity. f. Generate the circle pivot graph based on the data from the CSV file. g. Paste the generated pivot graph into the specified range in the Excel template. h. Save the filled Excel template with a name according to the current account’s “Subaccount” column. i. Close the Excel application instance.
  5. Repeat the loop for each row in the “ListAccount” file.

It’s important to handle exceptions and errors appropriately, such as checking if files exist before attempting to read or write to them, handling empty data gracefully, and logging any errors encountered during the process.

This workflow can be built using UiPath Studio by dragging and dropping activities from the activities panel and configuring their properties accordingly. Additionally, you may need to use variables, conditionals, loops, and other control flow activities to implement the logic described above.

If you face any issue let me know.

Thanks,
Ashok :slight_smile:

May I see the steps in the form of photos or files? because I’m still a beginner, I don’t understand it visually

Thankyou

CSV files are contained in folders. How do you do it if it’s like that?