studiox
2022.4
false
UiPath logo, featuring letters U and I in white

StudioX User Guide

Last updated Nov 18, 2024

Tutorial: Formatting Cells

In this tutorial, we will create a simple automation that applies one format to the cells in the header row of a spreadsheet and another format to the cells in the first column of the same spreadsheet. We will apply each format to a cell in the project's Project Notebook, and then use two Copy Range activities to copy the format of each cell to the intended row and column in our spreadsheet.

  1. Step 1: Set up the project and get the necessary files
    1. Create a new blank project using the default settings.
    2. Download and extract the archive with the automation project in this tutorial using the button at the bottom of this page and copy the file DoubleUI.xlsx to your project folder.
  2. Step 2: Apply the desired formats to two cells in the Project Notebook.
    1. Click Project Notebook in the StudioX ribbon. The file Project_Notebook.xlsx is opened.
    2. Apply the following format for the first column to cell A1 in the Scratchpad sheet of the Project Notebook:
      • Fill Color: Light Blue
      • Number format with two decimal spaces
    3. Apply the following format for the header row to cell B1 in the Scratchpad sheet of the Project Notebook:
      • Fill Color: Light Gray
      • Font Style: Bold
    4. Save and close the Project Notebook.
  3. Step 3: Add DoubleUI.xlsx to the project and copy the formats to the column and row.
    1. Click Add activity docs image in the Designer panel, and then find the Use Excel File activity in the search box at the top of the screen and select it. A Use Excel File activity is added to the Designer panel.
    2. In the activity:
      • Click Browse docs image next to the Excel file field, and then browse to and select the file DoubleUI.xlsx
      • In the field Reference as, enter DoubleUI.

        You have indicated that you will work on the file DoubleUI.xlsx that is known in your automation as DoubleUI.

    3. In the Use Excel File activity, click Add activity docs image, then find the Copy Range activity in the search box at the top of the screen and double-click it. The activity is added inside the Use Excel File activity.
    4. In the Copy Range activity:
      • Click Plus docs image on the right side of the Source range field, and then select Project Notebook (Notes) > Indicate in Excel.
      • In the Excel file, select cell A1 in the Scratchpadsheet, and then click Confirm in the UiPath tab in the Excel ribbon.

        You have indicated that you want to copy the A1 cell from the Scratchpad sheet of the Project Notebook.

      • Click Plus docs image on the right side of the Destination range field, and then select DoubleUI > Indicate in Excel.
      • In the Excel file, select the entire column A, and then click Confirm in the UiPath tab in the Excel ribbon.

        You have indicated that you want to paste the data to the first column in the DoubleUI file.

      • From the What to copy drop-down menu, select Formats to indicate that only the cell formatting should be copied.
    5. Add a second Copy Range activity just below the existing one.
    6. In the second Copy Range activity:
      • Click Plus docs image on the right side of the Source range field, and then select Project Notebook (Notes) > Indicate in Excel.
      • In the Excel file, select cell B1 in the Scratchpadsheet, and then click Confirm in the UiPath tab in the Excel ribbon.

        You have indicated that you want to copy the B1 cell from the Scratchpad sheet of the Project Notebook.

      • Click Plus docs image on the right side of the Destination range field, and then select DoubleUI > Indicate in Excel.
      • In the Excel file, select the header row (range A1:D1), and then click Confirm in the UiPath tab in the Excel ribbon.

        You have indicated that you want to paste the data to the range A1:D1 in the DoubleUI file.

      • From the What to copy drop-down menu, select Formats to indicate that only the cell formatting should be copied.
    7. To make the Copy Range activities more easily identifiable, edit the name in the upper bar of each one. For example, use Copy Format Column for the first, Copy Format Row for the second.


    8. Click Save in the StudioX ribbon to save the automation, then click Run to execute the automation.

    The formatting is copied from the two cells in the Scratchpad sheet of the Project Notebook file to the header row and first column of the DoubleUI file.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.