UiPath Documentation
activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

生产力活动

运行电子表格宏

UiPath.Excel.Activities.Business.ExecuteMacroX

描述

在启用宏的 workbook 中执行指定宏。可以传递宏参数并保存宏执行的输出。该活动可以与为父级使用 Excel 文件活动选择的 Excel 文件一起使用,也可以与“项目笔记本”一起使用。

配置活动

设计器面板

  • Source workbook - Select Plus on the right side of the field, and then select a workbook with the .xslm extension where to run the macro. Alternatively, you can select Open in Advanced Editor and enter a VB expression.

  • Macro name - Select Plus 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:

    • 项目笔记本、父级 Excel 文件或 Outlook 帐户中的数据。例如,在 Excel 文件中选择一个包含宏名称的单元格。
    • 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 - If the execution of the macro returns a value, select Plus on the right side of the field, and then use one of the options in the menu to indicate where to save the value:

    • 保存到项目笔记本或父级 Excel 文件中。例如,您可以保存到 Excel 文件中的单元格。
    • “保存以便以后使用”- 保存输出内容以供之后在项目中用作另一个活动的输入。
    • Open in Advanced Editor - Enter a VB expression.
  • Add Macro Argument - Select this button to add an argument to use when executing the macro. Add as many arguments as are required by the macro.

宏参数选项

  • Argument value - Select Plus on the right side of the field, and then use one of the other options in the menu to add an argument value:

    • 项目笔记本、父级 Excel 文件或 Outlook 帐户中的数据。例如,选择 Excel 文件中的一个单元格或所选 Outlook 电子邮件中包含值的一个字段。
    • 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.

属性面板

常见
  • DisplayName - The name displayed for the activity in the Designer panel.
输入
  • “宏名称” - 请在活动主体中查看“宏名称”
  • “workbook 名称” - 请在活动主体中查看“源 workbook”
其他
  • 私有 - 选中后将不再以“Verbose”级别记录变量和参数的值。
输出
  • “宏结果” - 请在活动主体中查看“输出位置”
  • 描述
  • 配置活动
  • 设计器面板
  • 属性面板

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新