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

生产力活动

使用 Excel 文件

UiPath.Excel.Activities.Business.ExcelApplicationCard

描述

用于选择要在自动化中使用的 Excel 文件,并使 StudioX 能够与 Excel 集成。 文件中的数据可用于在“使用 Excel 文件”中添加的所有活动。 这意味着,当您配置子活动时,您可以直接从 StudioX 中选择文件中的数据。 如果在设计自动化时 Excel 文件不存在,则可以定义与模板具有相同结构的现有 Excel 文件,以在设计时使用。

您可以直接在“ 使用 Excel 文件”活动中添加“用户界面自动化”活动,以快速自动化 Excel 界面。 为此,您需要在计算机上打开 Excel 文件。

备注:

如果使用扩展名为.xls的文件Excel 为 .xls 文件支持的所有活动都将在运行时起效。但是,在设计器中创建自动化时,无法直接从加号菜单中选择文件内容。要从文件中选择数据,请使用“在 Excel 中指明”“自定义输入”选项,或者保存.xlsx文件副本,并将其添加为模板文件

要了解如何使用此活动,请参阅:

配置活动

设计器面板

  • Excel file - Select 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 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.
  • 保存更改- 如果要在每次 Excel 活动更改文件内容后保存文件,请选择此选项。如果禁用此选项,请使用“保存 Excel 文件”活动。默认情况下选中此选项。禁用“保存更改”选项后,“Data Manager”面板中 Excel 资源条目旁边会显示“保存已关闭”消息。
  • “如果不存在,则进行创建”- 如果选中,则在指定路径下找不到 workbook 时,系统将新建一个 Excel workbook。如果未选择,则在指定路径找不到 workbook 时会发生错误。默认情况下,此选项处于选中状态。
  • “读取格式”- 选择要对从 Excel 读取的值应用哪种格式:
    • “与项目相同” - 该设置继承“项目设置”中的值。
    • 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, letting you 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.

属性面板

常见
  • DisplayName - The name displayed for the activity in the Designer panel.
文件
  • “编辑密码”- 编辑 Excel workbook 之前必须输入的密码(若文件受密码保护)。
  • Password - The password required for opening the Excel workbook, if the file is password-protected.
  • “workbook 路径”- Excel 文件的路径。如果文件不存在且您选择“新建文件”选项,则 StudioX 将创建此文件。
其他
  • 私有 - 选中后将不再以“Verbose”级别记录变量和参数的值。
选项
  • 如果不存在,则进行创建 - 请在活动主体中查看说明。
  • 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.
  • 读取格式 - 请在活动主体中查看说明。
  • “只读”- 如果选中,则系统将以只读模式打开指定的 workbook。选中此复选框后,您便可以在已锁定编辑或设置编辑密码的 PowerPoint 文件中执行数据提取操作。默认情况下未选中此选项。
  • 保存更改 - 请在活动主体中查看说明。
  • 敏感性标签(在 v2.24.0 - 预览版中提供) - 敏感性标签的字符串 ID 或 IExcelLabelObject 的实例。仅当敏感性操作为“添加”/“更新”时才使用它。否则,系统会忽略该字段。
  • 敏感性操作- 选择附加到文件的敏感性标签的行为。使用下拉列表在以下选项之间进行选择: “不执行任何操作”“添加/更新”“清除”
备注:
  • 有一个已知限制,使用 Excel 文件活动会发生 COM 对象错误。当您在一个Excel 流程作用域中打开 Excel 文件,然后在不同的Excel 流程作用域中重用同一文件时,就会发生这种情况。
  • Excel 活动模拟已登录 Excel 应用程序的用户。当机器人运行作业时,它会自动检索 Excel 用户的权限。因此,机器人不需要额外配置即可与敏感性标签交互。有关更多信息,请参阅使用敏感性标签
  • 描述
  • 配置活动
  • 设计器面板
  • 属性面板

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新