activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 6, 2024

Sort Range

`UiPath.Excel.Activities.Business.SortX`

Sorts the data in a specified sheet, table, or range by one or more columns. 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
  • Range - Click Plus on the right side of the field, then, from the menu, select the file and then a sheet, table, or range to sort, or select Indicate in Excel to indicate a range directly from the file. Alternatively, you can select Custom Input to enter a range, table name, or sheet name manually, or Open in Advanced Editor to enter a VB expression.

    The first row in the specified range is treated as a header row, which means the data is always sorted starting with the second row.

  • Add sort column - Click this button to add a column to sort by. If multiple sort columns are added, the order in which the columns are placed determines the order in which the data is sorted.

Sort by Column Options

  • Column - Click Plus on the right side of the field, and then select Range and the column to sort by. You can specify the column by selecting one of the values in the first row of the selected range from the menu, or by clicking Indicate in Excel and selecting any cell from the column directly from the file. Alternatively, you can use one of the other options in the menu to indicate the value form the cell in the first row of the column to sort by:

    • Select the Excel file, and then indicate the cell in the first row of the column to sort by.
    • Use Saved Value - Select a value that you previously saved for later use in the project.
    • Text - Enter the value in the Text Builder.
    • Ask when run - Prompt for the value when the project is executed.
    • Open in Advanced Editor - Enter a VB expression.
  • Direction - Select the direction of the sort from the drop-down menu: Ascending or Descending.
Properties Panel

Common

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

Input

  • Range - See Range in the body of the activity.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
  • Configuring the Activity

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.