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

生产力活动

查找数据的首行/末行

UiPath.Excel.Activities.Business.FindFirstLastDataRowX

描述

查找数据起始行和包含指定工作表、范围或表格中数据的最后一行的行号。该活动可以与为父级使用 Excel 文件活动选择的 Excel 文件一起使用,也可以与“项目笔记本”一起使用。

配置活动

设计器面板

  • Source - Select Plus on the right side of the field, then, from the menu, select the file and then a sheet, table, or range where to find the first and last rows with data, or select Indicate in Excel to indicate a range directly from the file. Alternatively, you can select Custom Input to enter the range manually, or Open in Advanced Editor to enter a VB expression.

  • Has headers - If this option is selected, it indicates that the first row in the defined source range is a header row. When you then indicate the column to search for data from the Column name field, the values in the column headers are displayed under Range, enabling you to identify the columns. If this option is not selected, the options displayed under Range are the column letters when the source range is a sheet or a range, or the header row values when the source range is a table.

  • 仅可见行- 如果选择此选项并筛选源范围中的数据,则仅返回可见行中的值。如果未选择,活动将在整个范围中搜索。

  • Column name - Select Plus on the right side of the field, then, from the menu, select Range, and then the column where to search for data. Depending on your selections for Source and Has headers, the columns are identified by the values in the first row of the selection or the letter of the column.

  • Save first row number as - Select Plus on the right side of the field and then, from the menu, select where to save the number of the first row with data:

    • Select an Excel file and then a named cell, or select Indicate in Excel to indicate a cell from the file.
    • “复制到剪贴板”- 将行号保存到剪贴板。
    • “保存以便以后使用”- 保存行号以便以后在项目中使用。
    • Open in Advanced Editor - Enter a VB expression.
  • 最后一行配置为- 选择是否应将最后一行作为最后填充的行返回,还是作为第一行为空:

    • 最后填充的行 – 返回最后填充的行。
    • 第一个空行” - 返回第一个空行。
  • Save last row number as- Select Plus on the right side of the field and then, from the menu, select where to save the number of the last row with data:

    • Select an Excel file and then a named cell, or select Indicate in Excel to indicate a cell from the file.
    • “复制到剪贴板”- 将行号保存到剪贴板。
    • “保存以便以后使用”- 保存行号以便以后在项目中使用。
    • Open in Advanced Editor - Enter a VB expression.
      备注:
      • 当最后一行配置为“第一个空行”时,活动针对空范围返回的值为 0。否则,返回的值为 -1。
      • 如果“”属性设置为单个单元格,则该活动将返回工作表中从源单元格到最后使用的单元格的所有单元格。

属性面板

常见
  • DisplayName - The name displayed for the activity in the Designer panel.
输入
  • “要跳过的空白行”- 确定范围已结束之前,数据中允许的连续空白行数。默认值为 1。
  • 列名称 - 请在活动主体中查看列名称
  • “第一行的偏移量”- 您可以将多行添加到在范围中找到数据的第一行(可选)。例如,如果您输入“3”,活动将找到第三行带有数据的行号。默认值为“0”。
  • “最后一行的偏移量”- 从范围中找到带有数据的最后一行减去某一数值的行(可选)。例如,如果您输入“3”,活动将查找倒数第三个非空白行的行号。默认值为“0”。
  • 来源范围 - 请在活动主体中查看来源
其他
  • 私有 - 选中后将不再以“Verbose”级别记录变量和参数的值。
选项
  • “有标题” - 在活动主体中查看“有标题”
输出
  • 第一行的索引 - 请在活动主体中查看将首行编号另存为
  • 最后一行的索引 - 请在活动主体中查看将末行编号另存为
  • 描述
  • 配置活动
  • 设计器面板
  • 属性面板

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新