Skip to main content

Read Cell

AutomatR.DefaultActivities.WorkBook.ReadCell

The "Read Cell" activity in AutomatR is part of the WorkBook activities package, allowing you to read the value of an Excel cell and store it in a variable. This activity is designed to retrieve specific cell content from an Excel spreadsheet, facilitating data extraction in automation workflows.

Properties

NameDescription
Input
Cell NumberSpecifies the cell number you want to read. String variables containing the cell number.
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 Cell" 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 cell value in string format. String variables to store the cell value.

How to use:

  1. Drag and drop the "Read Cell" 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 cell value.
  4. Specify the cell number from which to read the value.
  5. Optionally, provide the password for the workbook if required.
  6. Optionally, set the delay for the execution.
  7. Execute the workflow to read the specified cell value from the Excel spreadsheet.

Example:

Consider an example where the "Read Cell" activity is used to read the value from cell "A1" in the "Sheet1" of an Excel workbook:

Read Cell:
Display Name: "Read Cell A1"
Excel File Path: "C:\excelActivities\workbook.xlsx"
Sheet Name: "Sheet1"
Cell Number: "A1"
Password: workbookPassword
Result: cellValue

In this example, the activity reads the value from cell "A1" 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 cell value is stored in the variable "cellValue" for further use in the workflow.

Note: Ensure that the Excel file path, sheet name, and cell number are specified before executing this activity.