Skip to main content

Copy Sheet

AutomatR.Excel.Activities.CopySheet

The "Copy Sheet" activity in AutomatR is part of the Excel activities package, designed to facilitate the copying of a sheet from one workbook to another or within the same workbook. This activity streamlines sheet management tasks in Excel, enhancing the efficiency of automation workflows.

Properties

NameDescription
Input
Destination FileEnter the workbook file path where the sheet in scope needs to be copied. If left empty, the sheet is copied within the current workbook. String variables containing the destination file path.
Destination File PasswordEnter the password for the destination workbook file if it is password-protected. String variables containing the destination file password.
Destination Sheet NameEnter the sheet name in the destination file or the current workbook where the sheet needs to be copied. String variables containing the destination sheet name.
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 "Copy Sheet" 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.

How to use:

  1. Drag and drop the "Copy Sheet" activity onto the workflow.
  2. Configure the properties by specifying the destination file, destination sheet name, and optionally the destination file password.
  3. Optionally, configure the delay.
  4. Execute the workflow to copy the specified sheet to the destination workbook or within the current workbook.

Example: Consider an example where the "Copy Sheet" activity is used to copy a sheet named "Sheet1" to a workbook located at "C:\DestinationWorkbook.xlsx" with a 2-second delay:

Copy Sheet:
Destination File: "C:\DestinationWorkbook.xlsx"
Destination Sheet Name: "Sheet2"
Destination File Password: "password123"
Delay: 2

In this example, the activity copies the "Sheet1" to "Sheet2" in the destination workbook located at "C:\DestinationWorkbook.xlsx" with a 2-second delay, allowing time for any necessary cleanup or synchronization. If the destination workbook is password-protected, the password "password123" is provided for authentication.