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

Excel Process Scope

UiPath.Excel.Activities.ExcelProcessScopeX

Opens or reuses Excel processes, loads the Excel project settings and applies them to the associated Excel file. This activity makes managing Excel processes easier by allowing you to configure the launch method of an Excel process and how existing Excel processes are handled.

Some of the use cases are:

  • Enables or disables macros.
  • Handles conflict resolutions between Excel files.
  • Allows the termination of existing Excel processes to avoid conflicts.
  • Manages process modes (whether to open a new process, reuse an existing one, or prompt the user).

We recommend placing an Use Excel File activity inside an Excel Process Scope activity to open Excel documents with certain settings already applied.

Properties

Common
  • DisplayName - The display name of the activity.
Misc
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Options
  • Display alerts - If selected, Excel can display alerts and messages. The default value is Same as project. The drop-down contains three options, as follows: Same as project, False, True.
  • Existing processes action - The action to be executed if other Excel processes are running. The default value is Same as project. The drop-down contains three options, as follows:

    • Same as project - Applies the same settings as in the Project Settings.
    • None - No action is taken in relation to the existing processes on the machine.
    • Force kill - Closes any open Excel processes without making any attempt to save the file.
  • File conflict resolution - The action to be executed if Excel file conflicts are detected between Excel processes. For example, an Excel file is already open in another Excel process. The default value is Same as project. The drop-down contains five options, as follows:

    • Same as project - Applies the same settings as in the Project Settings.
    • None - No action is taken.
    • Close without saving - Closes any Excel files that are in conflict, without saving pending changes.
    • Prompt user - Shows the user a prompt saying that files need to be closed.
    • Throw exception - Raises an exception that can either be handled in a Try Catch activity or cause the workflow to terminate.
  • Launch method - Determines whether an Excel process is launched via COM APIs or as full process. The default value is Same as project. The drop-down contains three options, as follows:

    • Same as project - Applies the same settings as in the Project Settings.
    • Automation - Excel is started by the automation APIs. This is faster, but not all add-ins load, so it can caused problems if the workbook relies on an add-in to function correctly.
    • Application - Excel is started like a user manually opened it, ensuring that all aspects of Excel load, such as add-ins.
  • Launch timeout - The time to wait for Excel to start in seconds, if launched as a full process. The default value is 20 seconds.
  • Macro settings - Specifies the macro level for the current Excel file. The default value is Same as project. The drop-down contains four options, as follows:

    • Same as project - Applies the same settings as in the Project Settings.
    • EnableAll - All macros are enabled and can be run.
    • DisableAll - All macros are disabled in the specified Excel file. No macros can be run.
    • Use Excel's settings - Reads the current Excel Macro settings.
  • Process mode - Determines how the Excel Process Scope activity manages Excel processes:

    • Same as project - Applies the same settings as in the Project Settings. This is the default value.
    • Always create new - A new Excel process is always created to load all of the associated files.
    • Attended user - Enforces that there is only one Excel process on the machine. If more than one Excel process is found, the user is prompted.
    • Reuse if exists - Searches for any open Excel processes when the first Use Excel File activity is executed to verify if a file is already open. If an open file is found, that process is associated with Excel Process Scope. In the event that another open file is found, the File conflict resolution setting is applied.
    • Only if exists - Searches for any open Excel processes when the first Use Excel File activity is executed to verify if a file is already open. If an open file is found, that process is associated with Excel Process Scope. If no open files are found, an exception is thrown.
  • Show Excel window - If selected, Excel windows appear during the automation. The default value is Same as project. The drop-down contains three options, as follows:

    • Same as project - Applies the same settings as in the Project Settings.
    • False - Excel files are opened by the project in the background, with their windows hidden.
    • True - Excel files are opened by the project with their windows visible to the user.
  • Properties

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.