activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 21, 2024

Use Excel File

UiPath.Excel.Activities.Business.ExcelApplicationCard

Lets you select an Excel file to use in the automation and enables StudioX to integrate with Excel. The data in the file is available to all the activities added inside Use Excel File. This means that when you configure child activities, you can select data from the file directly from StudioX. If the Excel file does not exist at the time you design the automation, you can define an existing Excel file with the same structure as a template for use at design time.

You can add UI Automation activities directly in the Use Excel File activity to quickly automate the interface of Excel. For this to work, you need to have the Excel file open on your machine.

Note: If you use a file with the .xls extension, all activities supported by Excel for .xls files will work at runtime. However the contents of the file are not available for selection directly from the Plus menu when creating the automation in the designer. To select data from the file, either use the Indicate in Excel and Custom Input options, or save a .xlsx copy of the file and add it as a Template file.

To learn how to use this activity, see:

Configuring the Activity

In the Body of the Activity
  • Excel file - Click Browse next to the field, and then browse to and select an Excel, CSV, or text file to use in the automation. To create a new file when the automation is executed, browse to the folder where to create it and enter the file name.

    If you need to work with a file with a dynamic name, such as a file downloaded daily under a different name, you can provide the file path using one of the options in the Plus menu on the right side of the field. For example, select a cell in the Project Notebook where the file path can be extracted daily using the provided formulas, or select Ask when run to enter the path of the file when executing the project. In this situation, if you want to be able to easily configure the activities that use data from the file, select another Excel file with the same format as a Template file. Alternatively, you can work with a remote Excel file by inputting the SharePoint URL of the file.

  • Reference as - Enter a name by which to refer to the file in the automation project.
  • Save changes - Select this option if you want to save the file after each Excel activity that makes a change to its content. Use the Save Excel File activity if this option is disabled. This option is selected by default.

    When the option to save changes is disabled, the message save off is displayed next to the Excel resource in the Data Manager panel.

  • Create if not exists - If selected, a new Excel workbook is created if the workbook is not found at the specified path. If not selected, an error occurs if the workbook is not found at the specified path. This option is selected by default.
  • Read Formatting - Choose what formatting should be applied to values read from Excel:

    • Same as project - The setting inherits the value from the Project Settings.
    • Default - Applies the default formatting returned by Excel.
    • Raw Value - Retrieves the raw values from Excel and ignores all formatting.
    • Display Value - Retrieves the values as they are displayed in Excel.
  • Template file - If the Excel file you want to automate is dynamic or does not exist at the time you design the automation (for example, the file is downloaded or created by the automation), select this option to use another Excel file that has the same structure at design time.

    The data in this file is available for selection from the Plus menu, allowing you to easily configure the activities added inside Use Excel File. The template file is used only at design time. When the automation is executed, it processes the file defined in the Excel file field.

Properties Panel

Common

  • DisplayName - The name displayed for the activity in the Designer panel.

File

  • Edit password - The password required for editing the Excel workbook, if the file is password-protected.
  • Password - The password required for opening the Excel workbook, if the file is password-protected.
  • Workbook path - The path to the Excel file. If the file does not exist and you select the CreateNewFile option, StudioX creates the file.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Options

  • Create if not exists - See the description in the body of the activity.
  • Keep excel file open - If the file is not open at the time the project runs, keeps the workbook open after the project finished running instead of closing it. This can be used to review the file afterwards.
  • Read Formatting - See the description in the body of the activity.
  • Read-only - If selected, the specified workbook is opened in Read-Only mode. Selecting this check box enables you to perform data extraction operations in an Excel file which is locked for editing or has an edit password. This option is not selected by default.
  • Save changes - See the description in the body of the activity.
  • Sensitivity label - The string ID of the sensitivity label or an instance of the IExcelLabelObject. It is used only when the sensitivity operation is Add/Update. Otherwise, it is ignored.
  • Sensitivity operation - Select the behavior for the sensitivity label attached to the file. Use the dropdown to choose between the following options: Do nothing, Add/Update, or Clear.
Note: The Excel activities impersonate the user logged into the Excel application. When the robot runs the jobs, it automatically retrieves the Excel user's permissions. Therefore, no additional configuration is required for the robot to interact with sensitivity labels. For more information, refer to Working with sensitivity labels.
  • Configuring the Activity

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.