Excel Excel action group is intended for automating Excel spreadsheet manipulations, such as getting/setting cell values, switching between sheets, saving, etc. These actions are NOT automatically recorded when you work in Excel during recording process. Attention! All Excel Actions are executed in the background, so the application window does not appear on the screen. The main benefits of using Excel actions are: stability system actions are more reliable and quicker than image-based ones; speed of execution bot execution is done in background when Excel application window is not visible, RPA Recorder only displays the step number, name, and its result (success/failure). do not require active Window you do not need to put Excel actions inside a Window action. readability even new users will understand the action flow at first glance. Attention! All Excel Actions can only be used, if your spreadsheet is opened by the Open spreadsheet action. If you open the spreadsheet with the Launch Application or Enter Keystroke actions and add the Excel Actions to the recording, these actions will be skipped during playback or execution in Control Tower. Actions Library Actions Description Coordinates and Position Loops and Conditions Open Spreadsheet Save Spreadsheet Switch to Sheet Set Active Cell Set Cell Value Get Cell Value Delete Cell Get Row Get Column Get Range Set Range While bot is executing Excel actions, the following rules should be observed: Excel file should not be used by other program (opened in Excel editor or other application). For files with Protected View, only read operations are supported. Click Enable Editing to write information (set cell value, delete cell).
Coordinates and Position To perform cell operations (get/set/delete value, get row/column), bot can use either cell coordinates (A1, BQ503) or cell position (start of column, cell above, etc) as a unique cell identifier. Position is counted starting from currently selected cell (D7 on the example below). # Position options Preview Current (current cell) 1 Start of document 2 Start of column 3 Start of row 4 End of column 5 End of row 6 Cell above 7 Cell below 8 Cell to the left 9 Cell to the right Only Set Cell Value and Delete Cell actions modify the current position. If you save a spreadsheet with the D7 cell selected, next time you open the spreadsheet, position will be calculated starting from the D7 cell. Loops and Conditions When working with a spreadsheet you can use Loops and Conditions to repeat the Excel Actions (for example, Set Cell Value) as long as it is defined by the Loop or Condition. Excel Action with Loop
Excel Action with Condition Open Spreadsheet This action opens a specified Excel spreadsheet (.xls or.xlsx) in background for further data manipulations. The Open Spreadsheet action should contain other Excel actions as its children (Switch To Sheet, Get Cell Value, Delete Cell, etc.) just drag them onto the Open Spreadsheet action. Spreadsheet file will be automatically closed after bot executes the last child action of the Open Spreadsheet action. Bot can manipulate one spreadsheet at a time, therefore Open Spreadsheet actions cannot be nested inside each other. File location path to the spreadsheet that will be opened. You can type the path or click the Browse button and browse to it in file explorer. Save file after last action eliminates the need to create additional save action at the end of each excel block. Save Spreadsheet This action saves currently opened spreadsheet to the same or to a new file. Note that this action can be avoided if the Open Spreadsheet action has the Save file after last action flag enabled.
Save type Save to the same file currently opened file is saved with all previous changes. Save as a new file after save as new, all actions are performed on a new file, the initial file is closed without saving. Destination folder path to the folder where spreadsheet will be saved. You can type the path or click the Browse button and browse to it in file explorer. File name full name for a new spreadsheet. Switch to Sheet This action switches to a specific sheet in Excel file (makes it active) by its name or order number. Note that Excel file is opened on the last active sheet (where the last save was made).
Specify index the number of the sheet that you want to switch to. Numbering starts from 1. Specify name the name of the sheet that you want to switch to. Set Active Cell This action allows to choose a cell for following manipulations or actions using coordinates or position. You can use the action to start your iteration through the spreadsheet from a defined cell, as the MS Excel saves the selected cell and it can differ from that one you want to start with: Coordinates/Position see the Position description. Set Cell Value This action sets value for a specific cell by coordinates or position.
Coordinates/Position see the Position description. New cell value variable or string value that will be copied to the target cell. Get Cell Value This action gets value of a specific cell and sets it to a variable for further usage. Coordinates/Position see the Position description. Save cell value to variable the target cell value will be copied to this variable.
Delete Cell This action deletes value of a target cell. Coordinates/Position see the Position description. Get Row This action gets value of a specific spreadsheet row on an active sheet and sets it to a List variable for further usage. Index number of row (1, 2). Position position of the row related to the currently selected cell. Save result to list variable the target non-empty row values will be copied to this variable. Only List variable type is supported. Get Column This action gets value of a specific spreadsheet column on an active sheet and sets it to a List variable for further usage.
Index column index (A, F or 1, 2, 3). Position position of the column related to the currently selected cell. Save result to list variable the target non-empty column values will be copied to this variable. Only List variable type is supported. Get Range This action gets values from cells of a specific spreadsheet range on an active sheet and copies them to a Table variable for further usage.
From cell # starting cell of the range. It can be defined either explicitly F5 or using a Recorder variable of Text type ${start_cell}. To cell # end cell of the range. It can be defined either explicitly H20 or using a Recorder variable of Text type ${end_cell}. Save the selected to Table variable the values from the range, including cells without values, will be copied to this variable. Only the Table variable type is supported. If the From cell # field is empty, the selection starts from the first top-left cell (A1). If the To cell # field is empty, the selection is made to the last bottom-right non-empty cell. Empty spreadsheet cells are copied as empty values. If From > To (start and finish cells), the cells are swapped to make the selection. Example:
C5:A2 == A2:C5 D37:H27 == D27:H37 Set Range This action gets values from a Table variable and copies them to cells of a defined spreadsheet range on an active sheet. Input: Select Table variable select a Table variable to copy the values from and insert them to the range on the active sheet. From cell # starting cell of the range. It can be defined either explicitly A2 or using a Recorder variable of Text type ${start_cell}. To cell # end cell of the range. It can be defined either explicitly E20 or using a Recorder variable of Text type ${end_cell}. If the From cell # field is empty, the insertion starts from the first top-left cell (A1). If the To cell # field is empty, the whole content from the Table variable will be inserted to the spreadsheet. If From > To (start and finish cells), the cells are swapped to make the selection. Example: C5:A2 == A2:C5 D37:H27 == D27:H37 If the number of columns or rows in Excel Range is less, than the Table variable contains, these exceeding columns/rows are trimmed and not pasted. Alternatively, when the number of columns/rows in Excel Range exceeds the number of columns/rows in the Table variable, the Table content is inserted, and the other cells in the Range remain empty.