UiPath Documentation
studiox
2023.10
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

StudioX user guide

上次更新日期 2026年4月30日

自动化基础知识

备注:

The information on this page applies to projects with the Windows and Windows - Legacy compatibilities. For information specific to designing cross-platform projects, see Cross-platform Projects in the Studio guide.

关于活动

活动是自动化项目的基本构建块,每一个活动代表 StudioX 可以自动化的一个或多个手动任务。一系列相互关联的相关活动构成一个自动化项目。在考虑对重复性流程执行自动化时,必须首先将该流程分解为您要执行的各个单独的手动步骤,然后在 StudioX 中确定要将每个步骤自动化的活动。

例如,假设您要自动化以下工作流:

  1. 打开电子表格。
  2. 打开业务应用程序
  3. 从电子表格中的单元格复制数据。
  4. 将复制的数据粘贴到业务应用程序的字段中。
  5. 单击应用程序中的按钮以提交数据。

当您在 StudioX 中创建一个项目以使该过程自动化时,您将使用以下活动:

  1. 使用 Excel 文件指定您要使用的电子表格。
  2. 使用应用程序/浏览器指定您要使用的应用程序。
  3. “键入到”,以选择业务应用程序中要在其中复制数据的输入字段以及要从中复制数据的单元格。
  4. 点击指定要单击哪个按钮以在业务应用程序中提交数据。

手动步骤与 StudioX 活动之间并不总是一对一的关系。如上例所示,“键入到”活动涵盖两个手动步骤,因为您可以使用该活动来指定所复制文本的来源和目标。

活动面板

文档图像

The Activities panel shows available activities that can be added to the current project. In Windows and cross-platform projects, you can see both installed and installable activities, while in Windows - Legacy projects only installed activities are visible. Installed refers to activities packages that are already part of a project, while installable refers to packages that are available to install from the Official and Orchestrator Tenant feeds. To add an activity to your automation, double-click it or drag and drop it to the desired place in the Designer panel. Adding an installable activity installs its corresponding activities package in the project.

将鼠标悬停在面板中的活动上会显示该活动所属的包及其描述。要将活动添加到收藏夹列表,请右键单击它,然后选择“添加至收藏夹”

自定义活动面板

Click the Group by button at the top of the panel to group available activities by the category they belong to or by the package they belong to. You can also clear the two options to see an ungrouped list of activities arranged alphabetically.

Click the Filter by docs image button to filter activities based on the options below.

适用于 Windows跨平台项目
  • 按可用性筛选
    • 已安装 - 显示已安装且属于项目中的包的活动(无法停用此筛选器)
    • Available - Show discovered activities that you can add to you project
    • Windows - Show activities that are only available in Windows projects (this filter is only available in cross-platform projects)
  • 按类型筛选
    • 活动 - 显示活动
    • 触发器 - 显示触发器
  • Filter by category:
    • Developer - Show activities designed for the Studio profile.
适用于 Windows - 旧版项目
  • 按类型筛选
    • 活动 - 显示活动
    • 触发器 - 显示触发器
  • 按类别筛选:
    • Developer - Show activities designed for the Studio profile. These activities may not function as expected in the StudioX profile.

For example, if you are trying to view all Excel activities, you can select Group by Packages and deselect Group by Category.

容器活动

容器活动定义了执行添加到其中的活动所要满足的范围或条件。容器活动可以描述为包含一个或多个子活动的父活动。容器活动的示例包括:

  • Resource activities - Add an application resource to the automation and make that resource available to the activities added inside them.
  • For Each activities - Define a collection of items and repeat the activities added inside them once for each of those items.
  • Repeat number of times - Similar to a For Each, but it repeats the activities added inside it for a specified number of times.
  • If, Switch, and Check App State - Evaluate a condition and determine the flow of the automation by executing specific activities added inside them based on the result of the evaluation.
  • Wait for Download - Detects a file download initiated by the activities added inside it and makes the file available in the automation.

资源活动

根据活动所适用的应用程序将活动分类。在将您在应用程序中执行的任务自动化之前,必须先将所需的应用程序资源添加到自动化中。以下活动可将资源添加到您的自动化中:

  • Use Excel File - Use a specified Excel file. The data in the Excel file is available to all the activities added inside this activity. When you configure child activities, you can select individual cells, ranges, or sheets in the file directly from StudioX.
  • Use Desktop Outlook App, Use Outlook 365, and Use Gmail add a desktop Outlook, Outlook 365, and Gmail account to the automation. The emails in the account are available to all the activities added inside this activity. When you configure child activities, you can select individual folders, messages, or message fields directly from StudioX.
  • Use Word File - Use a specified Word document. Add the activities to perform on the file inside this activity.
  • Use Application/Browser - Use a specified desktop application or web browser page. Add the activities to perform in the application or web browser inside this activity.
  • Use PowerPoint Presentation - Use a specified PowerPoint file. Add the activities to perform on the file inside this activity.
  • Use OneDrive & SharePoint - Select an account to use for OneDrive and SharePoint automation. Add the related activities inside this activity.

您可以根据自动化需求添加任意数量的资源。对于使用多个应用程序的活动,请在另一个资源中添加资源。例如:

  • 要添加同时使用 Excel 文件中的数据和 Outlook 帐户中的电子邮件的活动,请在“使用桌面 Outlook App”活动中添加“使用 Excel 文件”活动,然后在“使用 Excel 文件”中添加常见活动。
  • 要添加同时使用网页和 Word 文档中数据的活动,请在“使用 Word 文件”活动中添加“使用应用程序/浏览器”活动,然后在“使用应用程序/浏览器”中添加常用活动。
向自动化添加全局资源

使用资源活动将资源添加到自动化中时,该资源仅可用于在资源活动内部添加的活动。要使资源可用于项目中的所有活动,可以通过将项目连接到资源来全局添加资源。全局资源是从“Data Manager”面板中管理,而不是作为活动添加到项目中。这意味着将项目连接到资源还有助于节省“设计器”面板中的空间。

For information on how to connect a project to an Excel workbook, see Connecting a Project to an Excel File.

遍历项目

Iterating refers to repeating one or more activities in your automation project for each individual item in a collection of items. To iterate through items, add one of the available For Each activities in which you define the collection, and then add the activities to repeat inside the For Each. When you configure the activities to repeat, indicate that an activity should use data from each item in the iteration by selecting the current item option from the Plus docs image menu.

StudioX 随附以下“遍历”活动:

  • For Each Excel Row - Repeat one or more activities for each row in an Excel table, range, or sheet.

    当前项目选项为 CurrentRow。对于某些活动,还必须从当前行中选择要使用的列。

  • For Each Excel Sheet - Repeat one or more activities for each sheet in an Excel file.

    当前项目选项为 CurrentSheet

  • For Each Email - Repeat one or more activities for each message in an Outlook folder, Gmail label, or in a selection of messages.

    当前项目选项为 CurrentMail。对于某些活动,您还必须从当前邮件中选择要使用的字段:主题、正文、HTML 正文、密件抄送、抄送、收件人、发件人或优先级。

  • For Each File in Folder - Repeat one or more activities for each file in a folder on your computer.

    当前项目选项为 CurrentFile。您还必须从当前文件中选择要使用的文件属性:大小、名称、完整名称(包括完整路径)、文件夹、上次修改日期、上次访问日期、创建日期、只读或以 KB 为单位的大小。

  • For Each Folder in Folder - Repeat one or more activities for each folder inside a specified folder on your computer.

    当前项目选项为 CurrentFolder。对于某些活动,您还必须从当前文件夹中选择要使用的文件夹属性:名称、完整路径或上次修改日期。

在配置“遍历活动”中添加的活动时,为了更容易识别,您可以使用描述您要迭代访问之项目的名称来重命名当前项目选项。

配置活动使用的数据

Activities can receive data as input and, upon execution, they can generate output data. You configure the data for each activity using the Plus docs image menu available on the right side of data fields.

Depending on its purpose, an activity can have no data fields, one, or multiple data fields. The following information describes the options you can find in the Plus docs image menu. Because the menu displays options that are relevant in the context of each field, activity, and parent activity, only a subset of the options is available for each field.

输入字段的选项

输入字段使用以下选项定义活动接收的数据:

  • 来自已添加至项目的资源的数据:

    • Excel - Data from the Project Notebook or from an Excel file added to the automation. Select named cells, named ranges, tables, or sheets directly from the Plus 文档图像 menu, or select Indicate in Excel to open the workbook in Excel and indicate in it. Selecting Custom Input lets you manually enter sheet names, table names, cell addresses, or range addresses. If the activity is inside an For Each Excel Row activity, you can select the current row in the iteration.
    • Outlook/Gmail/Outlook 365 - 来自为父级邮件资源活动定义的电子邮件帐户的数据。执行项目时,可以使用在 Outlook 桌面应用程序中选择的消息;如果该活动在“遍历电子邮件”活动中,则可以使用迭代中的当前电子邮件。
    • PowerPoint - 来自为父级“使用 PowerPoint 演示文稿”活动定义的 PowerPoint 演示文稿中的数据。您可以选择幻灯片、占位符、幻灯片母版或布局。
    • 文件 - 如果活动位于“遍历文件夹中的文件”活动中,则可以使用迭代中当前文件的属性。
  • Text - Enter text using the built-in text builder. You can click Plus 文档图像 inside the Text Builder to add Excel data, mail data, or values you saved for later use to the text.

  • 文本 - 空值 - 此选项使您能够在要添加其他文本或稍后更新文本的情况下将空文本作为值。

  • 数字 - 输入数值或公式。公式支持以下运算符和符号:+(加)、-(减)、*(乘)、/(除)、^(指数,例如 2^3 代表 2 的 3 次方)、( )(强制执行运算顺序)。

    You can click Plus docs image inside the Numeric Calculation window to add numeric values from the project. For example, select a cell in an Excel file, or a numeric value that you saved for later use.

  • Condition Builder - Add conditional statements that are used to determine what activities to execute based on whether or not the conditions are met. For example, the If activity contains a condition field, and it executes a series of activities if the condition is met and, optionally, another set of activities if the condition is not met. You create a conditional statement by selecting two values and comparing them using one of the available operators: greater than, greater than or equal, less than, less than or equal, equal to, not equal to, is empty, is not empty, is true, is false, starts with, ends with, contains, is numeric, is not numeric. You can add multiple statements and select if all of the statements or any of the statements must be true for the condition to be met.

  • True / False - Adds a conditional statement. Select either True or False for fields that support conditional statements in activities such as the If activity.

  • Use Variable - Use the output of another activity that you stored as a variable in the project for the current field. In certain cases, StudioX adapts the variable type so it matches the type the field requires. For example, you can use Text variables in fields that require a Number since the value is automatically converted from Text to Number. When a variable type is converted to another type, StudioX adds the new type at the end of the variable's name. In Windows and cross-platform projects, the variable selection window displays all the variables and arguments in the project, as well as properties specific to each data type. You can navigate to the desired property or use the search bar to find it. An icon next to each property indicates the type (for example, Tt for strings or 123 for numerical types). Variables that are automatically generated by StudioX for activity outputs are displayed under the activity where they were generated.

    文档图像

  • “选择日期/时间” - 从日历中选择日期或时间(小时、分钟)。此选项可用于日期和时间字段。

  • “选择持续时间” - 选择持续时间(小时、分钟和秒)。此选项可用于持续时间字段。

  • Runtime options - Contains the Ask when run and Paste from clipboard options. Ask when run prompts for a value during project execution, This option is available for fields that accept text, numeric, date/time, or Boolean (True/False) values. Paste from clipboard uses an output value that you copied to the clipboard in another activity as input for the current field. This option is available for fields that accept text values or Excel ranges.

  • “变量” - 选择一个为在 App/Web 活动选取器中使用而创建的变量。

  • “在高级编辑器中打开” - 输入 VB 表达式。

  • “清除值” - 清除字段中的当前选择。

输出字段的选项

输出字段使用以下选项定义活动生成的数据:

  • Excel - Save output to the Project Notebook or an Excel file defined for a parent Use Excel File activity. Select named cells, named ranges, tables, or sheets directly from the Plus 文档图像 menu, or select Indicate in Excel to open the workbook in Excel and indicate in it. Selecting Custom Input lets you manually enter sheet names, table names, cell addresses, or range addresses. If the activity is inside an For Each Excel Row activity, you can select the current row in the iteration.
  • “创建变量” - 将输出保存为变量,以备以后在自动化中使用。输入用于引用项目中变量的名称,从以下选项中选择作用域和数据类型:“文本”、“数字”、“True 或 False”、“带小数的数字”、“日期”和“持续时间”。然后,可以选择创建的变量作为另一个活动的输入。
  • Runtime options - Contains the Copy to clipboard option, which saves the output to the clipboard. You can then paste the value in an input field in another activity. This option is available for fields that output text, Boolean values (True/False), numbers, or Excel ranges (for example, the Destination field in the Copy Range activity). Boolean and number values are converted to text when copied to the clipboard.
  • Use Variable - Use the output of another activity that you stored as a variable in the project for the current field. In certain cases, StudioX adapts the variable type so it matches the type the field requires. For example, you can use Text variables in fields that require a Number since the value is automatically converted from Text to Number. When a variable type is converted to another type, StudioX adds the new type at the end of the variable's name. In Windows and cross-platform projects, the variable selection window displays all the variables and arguments in the project, as well as properties specific to each data type. You can navigate to the desired property or use the search bar to find it. An icon next to each property indicates the type (for example, Tt for strings or 123 for numerical types). Variables that are automatically generated by StudioX for activity outputs are displayed under the activity where they were generated.
  • 重命名变量 - 重命名您创建的变量以供以后使用。
  • “变量” - 选择一个为在 App/Web 活动选取器中使用而创建的变量。
  • “在高级编辑器中打开” - 输入 VB 表达式。
  • “清除值” - 清除字段中的当前选择。

使用一个活动的输出作为另一个活动的输入

将数据从一项活动传递到另一项活动可能非常有用,即使在尝试实现某些工作流程时也至关重要。StudioX 使您能够将活动生成的输出保存在变量中,然后在后面将其用作项目中其他活动的输入:

  1. To save data and use it in other activities, select the Create Variable option in the Plus docs image menu of a field that configures the output data of an activity, and enter a name for the variable (saved value). You will use this name later to identify and select the variable as input in another activity, so make sure to use a unique name that describes the variable.
    备注:

    某些活动可能要求您选择数据类型以及变量名称。请从以下选项中进行选择:“文本”、“数字”、“True 或 False”、“带小数位的数字”、“日期”和“持续时间”。如果列表中没有您需要存储的数据类型,请选择“高级选项”。

  2. To use the variable as input for another activity later in the project, select it from the Use Variable option in the Plus 文档图像 menu of a field that configures the input data of an activity.

在多种情况下,此功能可能会很有用。以下是几个示例:

  • “读取文本文件”活动可读取并输出文本文件的内容,然后可以将其用作“追加文本”活动的输入,以将文本添加到 Word 文件。
  • “文件存在”活动检查文件是否存在,并输出结果(真或假),然后在“If”活动的条件下使用该结果来确定文件已存在时要执行的特定操作。

属性面板

文档图像

“属性”面板包含上下文,用于查看和编辑所选活动的高级属性。如果选择多个活动,则仅可从“属性”面板修改通用属性。

默认情况下,“属性”面板处于隐藏状态。在大多数情况下,您可以使用“设计器”面板中的可用选项配置活动。在具有跨平台兼容性的项目中,所有活动属性都在“设计器”面板的活动卡中可用。这也适用于使用 Windows 兼容性的项目中的某些活动。

管理变量

Variables are used to store data of different types and pass it between activities in a project. All variables used in your project can be found and managed in the Data Manager panel. To edit or rename a variable, open the Data Manager panel, right-click on a variable and select Edit Variable.

Read more about variables in the Managing Your Project Data page.

备注:

从 StudioX v2022.4 开始,“已保存的值”已替换为“变量”。核心功能是相同的,但是变量允许在创建变量时设置数据类型,其以后可以由某些活动或由用户手动更改。在 StudioX v2022.4 中打开在旧版 StudioX 中创建的项目时,仍将使用“已保存的值”系统。

管理参数

Arguments are used to pass data between activities in a project and can be used to integrate an workflow with other products such as UiPath® Apps.

Once configured, you can use arguments in an activity similar to how you would use Variables (saved values). To edit or rename an argument, open the Data Manager panel, right click an argument and select Edit. Read more about arguments in the Managing Your Project Data page.

运行自动化

我们建议在设计阶段经常运行自动化。这使您能够验证项目是否按预期工作,并让您及早发现潜在的错误。

要运行自动化,请在 StudioX 功能区中单击“运行”,或在键盘上按 F5 键。

文档图像

您可以通过单击功能区中的“停止”或按键盘上的 F5 来停止执行项目。执行项目后,“设计器”面板顶部显示的消息将通知您运行是否成功。

要仅运行项目的一部分,请右键单击任何活动,然后选择:

  • “运行至该活动”,以执行项目中该活动之前的所有活动。
  • “自该活动运行”,以从该活动开始执行项目中的所有活动。

以画中画模式运行

如果要在项目执行期间使用计算机而不受 Robot 的干扰,则可以以画中画模式运行自动化。这将在另一个在单独的窗口中打开的会话中执行项目,从而使您可以完全控制键盘、鼠标和屏幕。

要在画中画模式中运行自动化,请在 StudioX 功能区中单击“运行”旁边的箭头,然后选择“在 PiP 中运行”。或者,您可以按键盘上的 F6键。Robot 会在新窗口中开始执行项目中的活动。

备注:

如果资源已在主会话中打开,则使用 Microsoft Office 资源的自动化将无法以画中画模式成功运行。在画中画中运行自动化之前,请关闭该自动化访问的所有 PowerPoint、Excel 或 Word 文件。

常见场景

为了帮助加快自动化设计的速度,StudioX 附带了常见场景,您可以将这些可重复使用的自动化片段添加到任何项目中。一个常见场景代表一个或多个活动,这些活动以逻辑顺序分组,用以自动完成一项任务或任务的一部分。

Common scenarios are context-sensitive, which means the available options depend on where exactly you are in your automation. For example, in a Use Desktop Outlook App activity, the available common scenarios are related to Outlook tasks, such as Download email attachments. For a list of available common scenarios, see Common Scenarios Descriptions.

要在项目中使用常见场景:

  1. Click the Add activity docs image icon in the Designer panel where you want to add the scenario. The Add Activity search bar appears with a list of relevant activities and common scenarios at the top.

  2. Click the common scenario you want to add. The activities in the scenario are added to the Designer panel.

  3. 如果需要,请配置所添加的活动。

    文档图像

下表描述了 StudioX 中可用的常见场景及其可能需要的任何配置。这些常见场景根据您可以添加的活动列出。

自动化中的任何地方

常见场景操作所需配置项
添加日期至文件夹文件名提示包含要更新文件名的文件夹,添加“写入单元格”活动,在项目笔记本的单元格中输入今天的日期,并且添加“遍历文件夹中文件”活动,迭代访问所选文件夹。在“遍历文件夹中文件”活动中,另一个“写入单元格”活动会将迭代中当前文件的名称复制到项目笔记本中,而“移动文件”活动会使用项目笔记本中的公式将当前日期添加到名称中。
删除文件夹和子文件夹提示要删除的文件夹,并添加“删除文件夹”活动,即使该文件夹包含文件或子文件夹,亦将其配置为删除。

使用 Excel 文件

以下常见场景如未添加到“使用 Excel 文件”活动中,则可以与项目笔记本一起使用。

常见场景

操作

所需配置项

合并范围

添加“附加范围”活动,该活动会复制一个范围中的所有值并将其附加到另一个范围;同时添加“删除行”活动,该活动将在附加数据后从目标中删除所有重复的行。

  • 在“附加范围”中,选择源范围和目标范围。
  • 在“删除行”中,选择目标范围。

针对 Excel 范围内的行重复操作

添加遍历 Excel 中的行活动。

  • 选择要使用的范围。
  • 在“遍历 Excel 中的行”活动中添加要重复执行的活动。

将 Excel 图表粘贴到 Powerpoint 中

Note: This scenario is available only when Use Excel File is placed inside an Use PowerPoint Presentation activity.

添加一个“获取图表”活动,该活动从 Excel 文件中选择一个图表并将其复制到剪贴板,以及一个“粘贴项目到幻灯片”活动,该活动将保存的 Excel 图表插入到 PowerPoint 演示文稿中。

  • In Get Chart , select the source chart and select Copy to clipboard in the Action field.
  • In Paste Item into Slide , select the Slide number and the Content placeholder in the presentation.

使用 PowerPoint 演示文稿

常见场景

操作

所需配置项

将 Excel 图表粘贴到 Powerpoint 中

Note: For this scenario to work properly, place a Use Excel File activity inside the Use PowerPoint Presentation activity before adding the scenario.

添加一个“获取图表”活动,该活动从 Excel 文件中选择一个图表并将其复制到剪贴板,以及一个“粘贴项目到幻灯片”活动,该活动将保存的 Excel 图表插入到 PowerPoint 演示文稿中。

  • In Get Chart , select the source chart and select Copy to clipboard in the Action field.
  • In Paste Item into Slide , select the Slide number and the Content placeholder in the presentation.

使用应用程序/浏览器

常见场景

操作

所需配置项

填写 Excel 表单

添加一个“遍历 Excel 中的行”活动,该活动包含三个"输入到"活动,这些活动配置为从所选范围的第一、第二和第三列复制数据,并将其粘贴到目标应用程序或网页中三个指定的字段中。默认情况下,使用项目笔记本的 Scratchpad 工作表中的范围 A1:C3
  • Make sure the range from the Scratchpad sheet of the Project Notebook contains the data to enter in the form (by default A1:C3 ). You can add another file in a parent Use Excel File activity and/or select another range for For Each Excel Row.
  • 指定每个“键入到”活动的目标元素。
  • 根据表单上字段的数量添加或删除“键入到”活动。

使用 Outlook 桌面应用程序

常见场景

操作

所需配置项

对电子邮件重复操作

添加“遍历电子邮件”活动。

  • 选择要使用的文件夹或消息。
  • 添加要在“遍历电子邮件”中重复执行的活动。

发送电子邮件

添加“发送电子邮件”活动。

配置“发送电子邮件”活动。

下载电子邮件附件

提示输入要保存附件的文件夹,添加“保存电子邮件附件”活动,然后添加“遍历文件夹中文件”活动,该活动包含配置为在“输出”面板中显示文件名的“写入行”活动。

 

电子邮件文件夹备份

提示在计算机上指定要保存电子邮件的文件夹,并在其中添加包含“保存电子邮件”活动的“遍历电子邮件”活动。

选择此文件夹,以从“遍历电子邮件”进行备份。默认情况下,选择“收件箱”。

创建联系人详细信息数据库

添加配置为使用收件箱中电子邮件的“遍历电子邮件”活动。“遍历电子邮件”内的“写入单元格”活动和“附加范围”活动会将每封电子邮件的发件人复制到项目笔记本中的新“联系人”表,“删除行”活动会删除重复项。

 

将电子邮件详细信息复制到 Excel

添加一系列“写入单元格”活动,这些活动会将电子邮件字段作为列标题添加到项目笔记本中名为“电子邮件”的新工作表中。

然后添加一个“遍历电子邮件”活动,该活动包含一系列将每个电子邮件的字段复制到 Scratchpad 工作表的“写入单元格”活动,以及一个将所有字段复制到电子邮件工作表的“附加范围”活动。

在“遍历电子邮件”中,选择要从中获取电子邮件的文件夹。默认情况下,选择“收件箱”。

通过电子邮件发送文件夹中的所有文件

提示要选择的文件夹并添加“发送电子邮件”活动,该活动配置为将所选文件夹中的文件用作附件。默认情况下,当前 Outlook 帐户会被添加到“收件人”字段。

编辑添加到活动字段的默认值以自定义电子邮件,例如添加一个或多个收件人,或编辑主题和正文。

适用于每封电子邮件

常见场景

操作

所需配置项

回复电子邮件

添加“回复电子邮件”活动,以回复迭代中的当前邮件,添加“将电子邮件标记为已读/未读”活动和“移动电子邮件”活动,以将电子邮件移动到另一个文件夹。

  • 在“回复电子邮件”中,编辑电子邮件正文。
  • 在“移动电子邮件”中,选择要将电子邮件移动到哪个文件夹。

转发电子邮件

添加“转发电子邮件”活动,以转发迭代中的当前邮件,添加“将电子邮件标记为已读/未读”活动和“移动电子邮件”活动,以将电子邮件移动到另一个文件夹。

  • 配置“转发电子邮件”活动。
  • 在“移动电子邮件”中,选择要将电子邮件移动到哪个文件夹。

移动电子邮件

添加“移动电子邮件”活动,以将迭代中的当前电子邮件移动到另一个文件夹。

在“移动电子邮件”中,选择要将电子邮件移动到哪个文件夹。

保存并处理电子邮件附件

提示输入用于保存附件的文件夹,添加“保存电子邮件附件”活动和“遍历文件夹中的文件”活动,在其中添加针对每个附件重复进行的活动。

在“遍历文件夹中的文件”活动中添加要针对每个附件重复执行的活动。

适用于文件夹中的每个文件

常见场景操作所需配置项
尝试以 Excel 格式打开文件添加一个“If”活动,该活动会检查迭代中的当前文件是否具有 .xlsx 扩展名。Then 分支包含“使用 Excel 文件”活动,如果满足条件,该活动会将当前文件添加到项目中。
添加日期至文件并将文件移动到子文件夹添加一个“创建文件夹”活动,该活动会在当前文件夹中创建一个名为 Processed 的子文件夹;一个“写入单元格”活动,将迭代中当前文件的名称复制到“项目笔记本”;以及一个“移动文件”活动,该活动会将当前文件移动到子文件夹,并使用项目笔记本中的公式将当前日期添加到名称中。
按类型对文件进行分组添加一个“写入单元格”活动,以将迭代中当前文件的名称复制到项目笔记本;一个“创建文件夹”活动,该活动使用项目笔记本中的公式在当前文件夹中创建一个以当前文件的扩展名命名的子文件夹;以及一个“移动文件”活动,将当前文件移动到子文件夹。
按大小对文件进行分组Adds an If activity that checks if the current file in the iteration is smaller than 100KB. The Then branch contains a Create Folder activity that creates a new folder with the title set to 100 K and a Move File activity that moves the current file in the iteration to the newly created folder. The Else branch contains an If activity that checks if the current file is smaller than 1000KB. Both the Then and Else branches contain a Create Folder and Move File activity.
按创建日期对文件进行分组添加一个“写入单元格”活动,以便将迭代中当前文件的创建日期复制到项目笔记本;一个“创建文件夹”活动,该活动使用项目笔记本中的公式在当前文件夹中创建一个以当前文件的创建日期命名的子文件夹;以及一个“移动文件”活动,将当前文件移动到子文件夹。
将文件信息复制到 Excel添加一系列“写入单元格”活动,这些活动将迭代中当前文件的名称、完整路径、大小和创建日期复制到 Scratchpad 工作表中,并添加一个“附加范围”活动以将所有字段复制到 Files 工作表中。

技巧和窍门

常规

  • 您可以直接从“Data Manager”面板中打开已添加到自动化中的 Excel、Word 和 PowerPoint 文件。右键单击任何 Excel 或 Word 资源,然后选择“打开”。您也可以选择“打开文件位置”,以打开包含此文件的文件夹。

    文档图像

  • If you're not sure which activity can help you automate a specific action, search through activities using either the search bar at the top of the Activities panel, or the one displayed at the top of the screen after you click Add activity docs image in the Designer panel. Searching returns results from activity names as well as descriptions, so it can be a good way to find activities you may not have discovered yet.

    文档图像

  • 关于您已添加到项目中的活动,如您需要帮助,请右键单击该活动,然后选择“帮助”,或者选中该活动后按键盘上的 F1 键以打开其文档页面,其中包含有关如何配置该活动的信息。

  • If you want to save a few clicks when designing your automations, you can double-click most activity fields to open the option in the Plus 文档图像 menu most commonly used to configure that field. For example, double-clicking a field that accepts text input opens the Text Builder, doing the same for the Condition field in the If activity opens the Condition Builder.

  • When you select Text from the Plus 文档图像 menu to add text to an activity field, you can compose text that combines multiple types of data using the Text Builder. In addition to typing text, you can select other types of data from the Plus 文档图像 menu in the upper-right corner the Text Builder. For example, you can add the contents of a cell in an Excel file, a field in an Outlook email, or one of the properties of a file on your computer that you saved for later in a previous activity.

用户界面自动化

  • When configuring a Use Application/Browser activity to add a desktop application to the automation, if you want the automation to open a specific file, indicate the application, and then add the path to the file in the Application arguments field. For example, if you indicated Acrobat Reader as the application to automate and you want to work with the file form_template.pdf located in the C:\Work folder, enter C:\Work\form_template.pdf in the Application arguments field to open the file in Acrobat when the automation is executed.

    文档图像

  • When indicating target elements of App/Web activities in web browsers, always add at least one anchor to make sure the element is correctly identified by the Robot. For more information about targets and anchors, see UI Automation.

  • 在配置“使用应用程序/浏览器”活动以自动化您在网页浏览器中执行的任务时,在指示网页浏览器之前,请导航至自动化执行第一个操作的网页。这样做会自动将页面的 URL 添加到“浏览器 URL”字段中,因此您不必手动输入它。

  • If you don't want to add too many Type Into activities to fill out a form with many fields, you can simplify your workflow by configuring one Type Into activity to enter text in multiple fields. After indicating the first field on the form and selecting the text to type into it, you can open the Text Builder of the Type this field, add the tab special key from the Plus 文档图像 menu inside the Text Builder, and then select the text for the following field. For example, provided that the tab key moves the cursor to the next field in the target application, configuring the Type this field like in the following image copies the text from three different cells and pastes it in three different fields.

    文档图像

  • 如果两个连续的 App/Web 活动未正确计时(例如,第一个活动花费很长时间才能执行操作,而第二个活动在上一个操作完成之前就开始),请在这些活动的“属性”面板中配置“之前延时”或“之后延时”属性,以确保第二个活动在第一个活动完成后才开始。这些属性在活动执行之前或之后增加了延时,从而在需要时增加了两次活动之间的时间。

  • When the actions you want to perform in a desktop application or web browser depend on the state of the application, use a Check App State activity to determine which actions to perform based on the state. This activity verifies whether an element appears in or disappears from the user interface of the target application and enables you to add different activities to execute when the element is found and/or when it is not found. For example, you can check if you are already logged in to a web application by verifying if the Log in button is present, and only perform the actions required to log in when the button is found.

Excel

  • The Excel files you add to automations are not always available at design time (for example, a file can be created by or downloaded during the automation). In this scenario, you can still take advantage of StudioX's deep integration with Excel to configure the activities that use the file by defining another file with the same format (same sheets, columns, tables, etc.) as a template file. Once defined, you can indicate data in Excel or select data from the template file directly from the Plus docs image menu. For example, if you want to create an automation with a report you'll receive monthly, use an existing report with the same format as the template. To define a template, add the Use Excel File Excel File activity, enter the path to the file to automate, then select the Template file option and indicate the file to use.
  • When you want to work with a .xls (Excel 97-2003) workbook, the data in the file cannot be accessed directly from the Plus 文档图像 menu. In this case, you can configure activities that use the file with the Indicate in Excel or Custom input options in the Plus 文档图像 menu. Alternatively, to be able to select data directly from the menu, create a .xlsx copy and add it as a template file.
  • When you filter rows in a large sheet and iterate through them using an Excel For Each Row activity, instead of iterating through the original sheet after applying the filter, use a Copy Range activity to copy the filtered rows to a different sheet, and then iterate through the filtered range in the new sheet. This will result in better performance when the project is executed.

桌面 Outlook App

  • You can add bodies formatted as HTML for emails sent using mail activities from the desktop Outlook app by selecting the Use Word Document option for the Body field. This enables you to select a Word document containing formatted text, images, or tables as the body of emails sent with the Send Email , Reply to Email, and Forward Email activities.

    文档图像

运行项目

  • 如果您要在项目执行期间使用计算机而不受 Robot 的干扰,您可以以画中画模式运行自动化。此功能让您可以在单独的窗口中打开的另一个会话中执行项目,从而完全控制键盘、鼠标和屏幕。要在画中画中运行自动化,请在 StudioX 功能区中单击“运行”旁边的箭头,然后选择“在画中画中运行”

    文档图像

  • 如果您在有机会阅读错误消息之前消除了在执行项目时发生的错误,则可以在“输出”面板中找到该错误消息。要访问“输出”面板,请在 StudioX 窗口的左下角单击“输出”

    文档图像

  • 为避免打开同一应用程序的多个实例,在运行自动化之前,请关闭其中使用的所有应用程序和文件。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新