Paste range from clipboard Version 1 (Python)

Action group: Office


Description

The action searches for and returns the addresses of all cells that contain the specified text

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for ods/xlsx documentRobin.OpenSheetD oc
Yes
TextThe text to be searchedRobin.String
Yes
Start line numberThe row number of the starting cell of the text search range. Numbering starts from 1. Default value: index of the first line in the used area of the active sheet of the document.Robin.Numeric
No
End line numberOrdinal number of the end line of the text search range. Numbering starts from 1. By default, the search ends on the last line of the area usedRobin.Numeric
No
Start cell columnThe start column of the text search range. By default, the search starts from the first column of the area usedRobin.String
No
Destination cell columnEnd column of the text search range. By default, the search ends at the last column of the scope used.Robin.String
No
Search MethodText search method. All methods are not case sensitive. Default value: Full text search.Robin.String
No
Results
ResultDictionary with records - found cells: record key = cell address, record value = cell value.Robin.Dictionary

Special conditions of use

None.

Example of use

Task

There is a file Book1.xlsx, it is necessary to find the text "test" in the range from 1-4 line in column A, save and close the document. 

Solution

Use the actions "Open", "Search text", "Save", "Close".

Implementation

  1. Move the "Open" action to the workspace and set its parameters
    In the "Path to file" field specify the path to the file Book1.xlsx





  2. Move the "Search text" action to the workspace and set its parameters
    In the "Context" field, specify the context created in step 1.
    In the "Text" field specify the value = text.
    In the "Sheet" field specify the value = Sheet1. 
    Fill the "Start line number" and "End line number" fields with the values 1 and 4, respectively. 
    Fill in the fields "Start cell column", "End cell column". 
    Fill in the "Search method" field, specifying the value "Full text search". 

  3. Move the "Save" action to the workspace and set its parameter.
    In the "Context" field specify the context of the opened document.

  4. Move the "Close" action to the workspace and set its parameter.


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

Result

The program robot completed successfully.

The required text has been found. 

The file is saved and closed. 

  • Нет меток