Skip to main content

Get Workbook Sheets

AutomatR.Excel.Activities.GetWorkbookSheets

The "Get Workbook Sheets" activity in AutomatR is part of the Excel activities package, designed to return a list of all the sheet names in a workbook as string variables. This activity provides valuable information about the sheets present in an Excel workbook, allowing for dynamic handling of multiple sheets within automation workflows.

Properties

NameDescription
Misc
Display NameThe display name of the activity. A display name is automatically generated when you indicate a target.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Get Workbook Sheets" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
SheetsOutputs a list of all the sheet names in a workbook as string variables. List variables containing sheet names, ordered by their index.

How to use:

  1. Drag and drop the "Get Workbook Sheets" activity onto the workflow.
  2. Optionally, configure the delay.
  3. Execute the workflow to retrieve the list of sheet names in the workbook.

Example: Consider an example where the "Get Workbook Sheets" activity is used to retrieve the names of all sheets in the workbook:

Get Workbook Sheets:
Delay: 2
Sheets: sheetNames

In this example, the activity retrieves the names of all sheets in the workbook, and the sheet names are stored in the list variable "sheetNames" for further processing in the workflow.

Note: Ensure that the "Get Workbook Sheets" activity is placed within an "Excel Root" activity to establish the Excel context for execution.