Filter data Version 1 (Python)

Action group: Office


Description

The action filters the data in the specified table and returns a new table with the filtered data

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for ods/xlsx documentRobin.OpenSheetD oc
Yes
Column nameThe name of the column by which the table will be filtered. If the field is empty, then the value is taken from the «Column index» fieldRobin.String
No
Column indexIndex of the column by which the table will be filtered. Indexing starts at 0. If the Column Name field is filled in, then the value in the Column Index field is ignored. The default value is «0»Robin.Numeric
No
CriterionThe filtering criterion. Filled in the format «=value», «<value», «>value», «>=value», «<=value», or «<>value». If the field value is not filled, then the filtering will be set by the value «(Empty)»Robin.String
No
Results
Filtered tableTable after filteringRobin.DataTable

Special conditions of use

None.

Example of use

Task

There is a file Book1.xlsx with data.

 

It is necessary to filter the data according to the condition: number>6 in column A, save the document. 

Solution

Use the actions "Open", "Filter data", "Save", "Close".

Implementation

  1. Assemble a robot scheme consisting of actions:

  2. Set the parameter for the "Open" action (specify the file path).   



  3. Set parameters for the "Filter data" action. 
    In the "Context" field specify the context created in step 1
    In the "Column name" field specify the value = A.
    In the "Criterion" field, specify the expression >6. 
    In the "Result" field specify the variable "Table", having created it in advance. 

  4. Set the parameter for the "Save" action. 

    5. Click on the "Start" button in the top panel. 

Result

The program robot completed successfully.

The data is filtered.

  • Нет меток