Subscribe

UiPath StudioX

The UiPath StudioX Guide

Execute Macro

UiPath.Excel.Activities.Business.ExecuteMacroX

📘

Note:

This activity was first introduced in the UiPath.Excel.Activities v2.8.0-preview activities package.

Executes a specified macro within a macro-enabled workbook. You can pass macro arguments and save the output of the macro execution.

In the Body of the Activity

  • Source workbook - Click plus button on the right side of the field, and then select a workbook with the .xslm extension where to execute the macro. Alternatively, you can select Open in Advanced Editor and enter a VB expression.
  • Macro name - Click plus button on the right side of the field, and then select Text to enter the macro name in the Text Builder. Alternatively, you can use one of the other options in the menu to indicate the macro name:
    • Data from an application added to a card in the project or from the Excel Workspace, for example a cell in an Excel file that contains the macro name.
    • Use Saved Value - Select a value in the form of a macro name that you previously saved for later use in the project.
    • Open in Advanced Editor - Enter a VB expression.
  • Output to - Click plus button on the right side of the field, and then use one of the options in the menu to indicate what to do with the value returned by the execution of the macro, if any.
    • Save to an application added to a card in the project or to the Excel Workspace. For example, you can save to a cell in an Excel file.
    • Save for Later Use - Use the output later in your project as input for another activity.
    • Open in Advanced Editor - Enter a VB expression.
  • Add Macro Argument - Click this button to add an argument to use when executing the macro. Add as many arguments as are required by the macro.

Macro Argument Options

  • Argument value - Click plus button on the right side of the field, and then use one of the other options in the menu to add an argument value:
    • Data from an application added to a card in the project or from the Excel Workspace, for example a cell in an Excel file, or a field in a selected Outlook email that contains the value.
    • Use Saved Value - Select a value that you previously saved for later use in the project.
    • Text - Enter text in the Text Builder.
    • Number - Enter a numeric value.
    • Open in Advanced Editor - Enter a VB expression.

Properties

Common

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

Input

Misc

  • Private - If selected, the data used in the activity is not logged by StudioX.

Output

Updated 2 years ago


Execute Macro


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.