Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Worksheet operations

  • Updated: 10/05/2021
    • Automation 360 v.x
    • Build
    • RPA Workspace

Worksheet operations

The Excel advanced package contains various actions that you can use to automate worksheet-related tasks.

Worksheet actions in the Excel advanced package

The Excel advanced package includes the following actions:

Action Description
Access password protected worksheet Accesses a password-protected worksheet in the current workbook.
  • Enter the name of the session used to open the workbook with the Open action.
  • Enter the password to access the worksheet.
Append worksheet See Using Append worksheet action.
Create worksheet Creates a worksheet in the current workbook.
  • Enter the name of the session used to open the workbook with the Open action.
  • Specify either an index number in the Sheet by Index field or a name in the Sheet by Name field for the worksheet. The index number is the number assigned to a worksheet. For example, if you want to perform an operation on the worksheet at the third position in the workbook, enter 3 in the field.
Delete worksheet Deletes a spreadsheet from the current workbook.
  • Enter the name of the session used to open the workbook with the Open action.
  • Specify either an index number in the Sheet by Index field or a name in the Sheet by Name field for the worksheet. The index number is the number assigned to a worksheet. For example, if you want to perform an operation on the worksheet at the third position in the workbook, enter 3 in the field.
    Note: You can delete a worksheet only if the workbook contains more than one worksheet.
Get current worksheet name Gets the name of the current worksheet and assigns it to a string variable.
  • Enter the name of the session used to open the workbook with the Open action.
  • Select a string variable that you want to use to store the name of the worksheet from the Assign the output to variable list. The Control Room shows a descriptive default variable name. If you create several output variables, subsequent variable names are appended with a -1, -2, -3, and so on to avoid duplication.
Get worksheet as data table Gets data from a worksheet and saves it in a table variable.
  • Specify either an index number in the Sheet by Index field or a name in the Sheet by Name field for the worksheet. The index number is the number assigned to a worksheet. For example, if you want to perform an operation on the worksheet at the third position in the workbook, enter 3 in the field.
  • Choose from the Read option to read either the visible text or value of the cell.

    For example, if the cell has 70% as cell content, Read cell value option will read the value as 70 ignoring the % format whereas Read visible text option will read the content as 70%.

    Recommendation: Use option Read cell value as reading value from a cell gives better performance than reading a visible text.
  • Enter the name of the session used to open the workbook with the Open action.
  • Select a table variable that you want to use to store the data from the worksheet from the Assign value to the variable list. The Control Room shows a descriptive default variable name. If you create several output variables, subsequent variable names are appended with a -1, -2, -3, and so on to avoid duplication.
Get worksheet names Gets the names of all the worksheets and assigns them to a list variable of string data type.
  • Enter the name of the session used to open the workbook with the Open action.
  • Select a string variable that you want to use to store the name of the worksheet from the Assign the output to variable list. The Control Room shows a descriptive default variable name. If you create several output variables, subsequent variable names are appended with a -1, -2, -3, and so on to avoid duplication.
Hide worksheet Hides a worksheet from the current workbook.
  • Specify the name of the worksheet to hide in the Enter worksheet name to hide field.
    Note: You can hide a worksheet only if the workbook contains more than one worksheet.
  • Enter the name of the session used to open the workbook with the Open action.
Password protect worksheet Protects a worksheet with a password. You can also specify the operations to restrict on the worksheet.
  • Specify the password you want to use to protect the worksheet and select the check boxes for the operation that you want to restrict on the worksheet. For example, select the Delete row and Delete column check boxes to restrict a user from deleting a row or column from the worksheet.
  • Enter the name of the session used to open the workbook with the Open action.
Rename worksheet Renames a worksheet in the current workbook.
  • Specify the index number or name of the worksheet to rename in the Sheet by Index or Sheet by Name field.
    The index number is the number assigned to a worksheet. For example, if you want to perform an operation on the worksheet at the third position in the workbook, enter 3 in the field.
    Note: You cannot rename the worksheet if a worksheet with the same name already exists in the workbook.
  • Enter the new worksheet name that is under 31 characters.
  • Enter the name of the session used to open the workbook with the Open action.
Retrieve sheets count Gets the number of sheets available in the current workbook and stores it in a number variable.
  • Select the appropriate option to specify whether to include the hidden worksheet or not and assign the count to a variable.
  • Enter the name of the session used to open the workbook with the Open action.
  • Select a number variable that you want to use to store the name of the worksheet from the Select the variable to assign to list. The Control Room shows a descriptive default variable name. If you create several output variables, subsequent variable names are appended with a -1, -2, -3, and so on to avoid duplication.
Run macro Runs a macro in a worksheet.
  • Specify the name of the macro you want to run and its arguments.
  • Enter the name of the session used to open the workbook with the Open action.
Switch to sheet Activates a particular sheet in a Microsoft Excel file.
  • Enter the name of the session used to open the workbook with the Open action.
  • Specify whether to activate the Sheet by Index (numerical value) or Sheet by Name.
Note: The bot containing the Switch to sheet action switches to the hidden worksheet and performs operations on it. After the operations are completed, the worksheet remains hidden and is not activated.
Unhide all worksheets Unhides all worksheets in the current workbook. Enter the name of the session used to open the current workbook with the Open action.
Unhide worksheet Unhides a specific worksheet in the current workbook.
  • Enter the name of the worksheet you want to unhide.
  • Enter the name of the session used to open the workbook with the Open action.
Write from data table Write values from a data table into a worksheet.
  • Specify the data table variable that contains the data you want to write in a worksheet.
  • Specify whether you want to write data in the currently Active worksheet or Specific worksheet.
  • Specify the address of the cell that you want to use as the starting point of the data in the Specify the first cell field.
  • Enter the name of the session used to open the workbook with the Open action.
Send Feedback