Subscribe

UiPath Activities

The UiPath Activities Guide

Find First/Last Data Row

UiPath.Excel.Activities.Business.FindFirstLastDataRowX

Finds the row number for the row where data starts and for the last row containing data in a specified sheet, range, or table. The activity can be used with an Excel file selected for a parent Use Excel File activity or with the Project Notebook.

Configuring the Activity

In the Body of the Activity

  • Source - Click Plus plus buttonplus button 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 easily 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 - Click Plus plus buttonplus button 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 - Click Plus plus buttonplus button 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.
    • Copy to clipboard - Save the row number to the clipboard.
    • Save for Later Use - Save the row number for later use in the project.
    • Open in Advanced Editor - Enter a VB expression.
  • Save last row number as- Click Plus plus buttonplus button 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.
    • Copy to clipboard - Save the row number to the clipboard.
    • Save for Later Use - Save the row number for later use in the project.
    • Open in Advanced Editor - Enter a VB expression.

In the Properties Panel

Common

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

Input

  • Blank rows to skip - Number of consecutive blank rows allowed in the data before determining the range has ended. The default value is 1.
  • Column name - See Column name in the body of the activity.
  • First row offset - Optionally, you can add a number of rows to the first row where data is found in the range. For example, if you enter 3, the activity finds the number of the third row with data. The default value is 0.
  • Last row offset - Optionally, you can subtract a number of rows from the last row where data is found in the range. For example, if you enter 3, the activity finds the number of the third non-blank row from the bottom. The default value is 0.
  • Source range - See Source in the body of the activity.

Misc

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

Options

Output

Updated 29 days ago


Find First/Last Data Row


Suggested Edits are limited on API Reference Pages

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