Sort Version 10 (Net)

Action group: Excel 


Description

The action sorts the table by column.

Icon

Settings of parameters

Property

Description

Type

Example of filling in

Obligatory to fill in the field

Parameters

Context

Action context for working with an Excel document

Excel instance

Excel context

Yes

Sort column name

Name of the column to be sorted by. If the field is not filled in, the value from the " Sort column index" field is taken. If the sorting column name and index fields are not filled in, sorting is performed by the first column in the range.

String


No

Sort column index

The index of the column by which the sorting will be performed. If the "Sort column name" field is filled in, the value of this field is ignored. If the sorting column name and index fields are not filled in, sorting is performed by the first column in the range.

Numeric


No

Start cell column name

The column name of the initial cell (range start) from which the sorting range will be set. If the field is not filled in, the value from the "Start cell column index" field is taken.

String


No

Start cell column index

The column index of the initial cell (range start) from which the sorting range will be set. If the field is not filled in, the boundary of the used area is taken.

Numeric


No

Start cell row

The starting cell string from which the sort range will be set.

Numeric


No

End cell column name

The column name of the end cell (end of range) to which the sort range will be set. If the field is not filled in, the value from the "End cell column index" field is taken.

String


No

End cell column index

The column index of the end cell (end of range) to which the sorting range will be set. If the field is not filled in, the boundary of the used area is taken.

Numeric


No

End cell row

The end cell string to which the sort range will be set.

Numeric


No

Order

Sort order. Only the order of the data included in the range is changed. The order of the data in the table that were not included in the sorting range is not changed. If the set range contains data of one column (for example, from "A1" to "A10"), the data sorting is performed only within this column and the set range of rows - the parameters "Sort column name" and "Sort column index" do not influence the sorting. If the set range contains data of two or more columns (for example, from "A1" to "C10"), the data sorting is performed by the column specified in the "Sort column name" or "Sort column index" parameters. If the parameters "Sort column name" and "Sort column index" are not filled in, the sorting is performed by the first column in the range.

String


No

Special conditions of use

Only the order of the data included in the range is changed. 

The order of data in the table that were not included in the sorting range is not changed.

If the set range (fields "Start cell row" and "End cell row") contains data:

  • one column (for example, from "A1" to "A10"), the data is sorted only within this column and the set range of rows. The "Column" parameter has no effect on sorting.
  • two or more columns (for example, from "A1" to "C10"), the data sorting is performed by the column specified in the "Column" parameter. If the "Column" parameter is not filled in, sorting is performed by the first column in the range. 

Example of use

Task

There is an Excel document with a table of countries:

You need to sort a list alphabetically from A to Z. 

Solution

Use the "Open", "Sort", "Save" actions.  

Implementation

  1. Assemble a robot scheme consisting of the actions:


  2. Fill in the parameters for the "Open" action. In the "Path to file" field, specify the path to the required Excel file. Check the Visible = true checkbox to display robot actions on the screen. 


  3. Fill in the parameters for the "Sort" action. Fill the "Context" parameter and the "Order" field by specifying the value "A to Z". The other parameters do not need to be filled in this case, as it is necessary to apply sorting to the whole table. 


  4. Fill in the parameters for the "Save" action. In the "Context" parameter specify the context of the Excel document. 


  5. Launch the robot using the "Start" button in the top panel. 

Result

The program robot completed successfully.

The sorting is done correctly.

  • Нет меток