Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Workbook operations

  • Updated: 2021/12/22
    • Automation 360 v.x
    • Build
    • RPA Workspace

Workbook operations

A workbook is a file that contains one or more worksheets. The Excel advanced package contains various actions that you can use to automate workbook-related tasks.

Workbook actions in the Excel advanced package

The Excel advanced package includes the following actions:

Action Description
Append workbook Adds all the worksheets from the specified workbook to the end of the currently open workbook.
  • Enter the name of the session used to open the workbook with the Open action.
  • Specify the workbook from which you want to append the worksheets in the Append from workbook field.
  • If the workbook is protected, select the Password is required check box and enter the password in the To open field.
Close Closes the current workbook and provides an option to Save changes when closing the file. Enter the name of the session used to open the workbook with the Open action.
Convert excel to PDF Converts the entire workbook, specific worksheets in a workbook, or a CSV file to a PDF file.
  • Enter the name of the session used to open the workbook with the Open action.
  • Specify whether you want to convert the Entire excel file, Active sheet, or Specific sheet to a PDF file.
  • Enter a name for the PDF file in the Select PDF file name field.
  • Specify the location where you want to save the file in the Select PDF storage location field.
Create workbook Creates a Microsoft Excel workbook or a CSV file.
  • Enter the name of the session used to open the workbook with the Open action.
  • Specify the location where you want to save the workbook in the File path field.
  • Specify the name of the worksheet and passwords to open and edit the workbook.
  • Select any of the following tabs to create an Excel session:
    • Local session: Specify a session name that can be used only in the current bot.
    • Global session: Specify a session name that can be used across multiple bots, such as parent bots, child bots, and other child bots of the parent bots.
      You can also use the Global session option to loop through each row in an Excel advanced worksheet.
      Note: You can open an Excel worksheet by using the Global session option and use it across multiple bots without having to share the session by using the Set session variable action.
      You can also close the session from the child bot when you are using the Global session option and sharing the session across child bots.
      Important: If you close the session from the child bot and run the parent bot, then in the parent bot, the actions that come after the child bot are not run, and the bot fails with an error because the session has already been closed from the child bot.
    • Variable: Specify a session variable that can be used to share that session with other child bots.
Open See Using the Open action for Excel advanced.
Protect workbook Protects the workbook and its structure using a password. Protecting a workbook prevents other users from opening the workbook without the password, and protecting the structure of a workbook prevents other users from adding, moving, deleting, hiding, and renaming worksheets within that workbook.
  • Enter the name of the session used to open the workbook with the Open action.
  • Select the Protect workbook and Protect workbook structure check boxes and provide a password in the respective fields.
Save workbook Saves the current workbook. Enter the name of the session used to open the current workbook with the Open action.
Note: When you open an Excel file from the Control Room and make changes to the file, the updated file is not saved in the Control Room. This action is supported only for Excel files opened from the desktop.
Set session variable Assigns the session name to a variable.

Use this action in a parent bot, and then insert the variable containing the session name in Excel-related actions in the child bot to associate the actions with the file opened in that session. When you run the bot, it passes the session variable to the child bot, which enables the child bot to process the data in the file opened in the parent bot.

Note: The parent and child bots must use actions from the same Excel package version to pass the session variable.

Example of sharing an Excel session between bots

Unprotect workbook Unprotects a workbook and its structure. Unprotecting a workbook removes the restriction applied on opening the workbook, and unprotecting the structure of a workbook removes the restriction applied on modifying the structure of the workbook. Unprotecting allows other users to open the workbook, add, move, delete, hide, and rename worksheets within the workbook.
  • Enter the name of the session used to open the workbook with the Open action.
  • Select the Unprotect workbook and Unprotect workbook structure check boxes and provide a password to unprotect the workbook structure.
Send Feedback