Skip to main content

Read Range

AutomatR.DefaultActivities.WorkBook.ReadRange

The "Read Range" activity in AutomatR is part of the WorkBook activities package, facilitating the extraction of values from a specified Excel range and storing them in a DataTable variable. This activity enhances data handling capabilities in automation workflows.

Properties

NameDescription
Input
Excel File PathSpecifies the full path of the workbook on the local drive, including the filename (e.g., "C:\excelActivities\workbook.xlsx"). String variables containing the path.
Include HeadersWhen enabled, considers the first row as the header in the mentioned range of cells. Boolean variables to determine header inclusion.
PasswordSpecifies the password for the workbook if required. Object variables containing the password.
RangeSpecifies the range to read and use for further operations. String variables containing the range (e.g., "A1:B10").
Sheet NameSpecifies the name of the spreadsheet in which you want to perform the action. String variables containing the sheet name.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Read Range" activity. Useful for handling synchronization issues. Integer variables containing the delay duration (e.g., 5 seconds).
Output
ResultStores the data extracted from the specified range in a DataTable variable. DataTable variables to store the extracted data.

How to use:

  1. Drag and drop the "Read Range" activity onto the workflow.
  2. Configure the properties by specifying the Excel file path, sheet name, range, and other optional parameters.
  3. Optionally, configure the delay for synchronization and customize other settings.
  4. Execute the workflow to read the specified range in the Excel workbook and store the data in a DataTable variable.

Example: Consider an example where the "Read Range" activity is used to read data from cells A1 to B10 in the "Sheet1" of the workbook "workbook.xlsx":

Read Range:
Excel File Path: "C:\excelActivities\workbook.xlsx"
Sheet Name: "Sheet1"
Range: "A1:B10"
Include Headers: True
Delay: 5
Password: "your_password"
Result: ExcelData

In this example, the activity reads the specified range, including headers, from the "Sheet1" of the workbook and stores the data in the DataTable variable "ExcelData" for further processing.