Skip to main content

Write Cell

AutomatR.DefaultActivities.WorkBook.WriteCell

The "Write Cell" activity in AutomatR is part of the WorkBook activities package, allowing users to write a value into a specified cell or range within an Excel spreadsheet. This activity is useful for automating data entry and updating values in Excel workbooks.

Properties

NameDescription
Input
Cell NumberSpecifies the cell number (or range) where the data should be written in the Excel sheet. For example, "A1" for a single cell or "A1:B2" for a range. String variables containing the cell number or range.
Cell ValueSpecifies the value to be written into the specified cell or range. String variables containing the value to be written.
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 file path.
PasswordSpecifies the password for the workbook if required. Object variables containing the password.
Sheet NameSpecifies the name of the spreadsheet in which to write the cell value. 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 "Write Cell" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the delay is 5 seconds, enter "5".

How to Use

  1. Drag and drop the "Write Cell" activity onto the workflow.
  2. Configure the properties by specifying the Excel file path, sheet name, cell number, cell value, and optionally, the delay.
  3. Execute the workflow to write the specified value into the designated cell or range in the Excel spreadsheet.

Example

Consider an example where the "Write Cell" activity is used to write the value "100" into cell "A1" of a sheet named "DataSheet" in a workbook located at "C:\excelActivities\workbook.xlsx":

Write Cell:
Excel File Path: "C:\excelActivities\workbook.xlsx"
Sheet Name: "DataSheet"
Cell Number: "A1"
Cell Value: "100"

In this example, the activity writes the value "100" into cell "A1" of the "DataSheet" and updates the Excel workbook accordingly.