Skip to main content

Read Column

AutomatR.DefaultActivities.WorkBook.ReadColumn

The "Read Column" activity in AutomatR is part of the WorkBook activities package, allowing you to read values from a column in an Excel spreadsheet. This activity provides flexibility in extracting column data based on either the column name or index, enabling efficient data retrieval for analysis and automation workflows.

Properties

NameDescription
Input
Column IndexSpecifies the index of the column for which values need to be retrieved. String variables containing the column index.
Column NameSpecifies the name of the column for which values need to be retrieved. String variables containing the column name.
Excel File PathSpecifies the full path of the Excel workbook on the local drive, including the filename (e.g., "C:\excelActivities\workbook.xlsx"). String variables containing the Excel file path.
PasswordSpecifies the password for the workbook if required. Object variables containing the password.
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 Column" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 5 seconds, enter 5.
Output
ResultReturns the list of strings containing the values of the selected column. List variables to store the column values.

How to use:

  1. Drag and drop the "Read Column" activity onto the workflow.
  2. Specify the full path of the Excel workbook, including the filename.
  3. Specify the name of the sheet from which to read the column values.
  4. Specify either the column name or index for which you want to retrieve values.
  5. Optionally, provide the password for the workbook if required.
  6. Optionally, set the delay for the execution.
  7. Execute the workflow to read values from the specified column in the Excel spreadsheet.

Example:

Consider an example where the "Read Column" activity is used to extract values from the "ColumnA" of the "Sheet1" in an Excel workbook:

Read Column:
Display Name: "Read ColumnA Values"
Excel File Path: "C:\excelActivities\workbook.xlsx"
Sheet Name: "Sheet1"
Column Name: "ColumnA"
Password: workbookPassword
Result: columnValues

In this example, the activity reads the values from "ColumnA" in the "Sheet1" of the Excel workbook located at "C:\excelActivities\workbook.xlsx". If a password is required for the workbook, it is provided through the "workbookPassword" variable. The resulting column values are stored in the list variable "columnValues" for further use in the workflow.

Note: Ensure that either the column name or index is specified before executing this activity.