# Copy/Paste Range

> `UiPath.Excel.Activities.Business.CopyPasteRangeX`

`UiPath.Excel.Activities.Business.CopyPasteRangeX`

Copies a range or sheet and pastes it to another location in the current workbook, to a different workbook, or to the clipboard. The activity can be used with Excel files selected for parent [Use Excel File](https://docs.uipath.com/activities/other/latest/productivity/excel-application-card) activities or with the Project Notebook.

You can copy values, formulas, images, number and cell formats, and transpose (rotate) data. The following table lists supported copy-paste combinations:

| Copy from | Paste to |
| --- | --- |
| Sheet | Sheet |
| Range | Sheet |
| Range | Range |
| Range | Cell |
| Cell | Cell |
| Cell | Range |

To learn how to use this activity, see:

* [Tutorial: Comparing Excel Files and Emailing Reconciliation Errors](https://docs.uipath.com/studiox/v2020.10/docs/tutorial-comparing-excel-files-and-emailing-reconciliation-errors).
* [Tutorial: Filtering Data in Excel](https://docs.uipath.com/studiox/v2020.10/docs/tutorial-filtering-data-in-excel).

## Configuring the activity

#### In the body of the activity

* **Source** - Select **Plus** on the right side of the field and then, from the menu, select a named range, table, or sheet to copy, or select **Indicate in Excel** to open the file and select a range directly from the file. Alternatively, you can select **Custom Input** to enter the range manually, **Paste from clipboard** to paste data from the clipboard, or **Open in Advanced Editor** to enter a VB expression.
* **Destination** - Select **Plus** on the right side of the field and then, from the menu, select the Excel file and then a named cell, range, table, or sheet where to paste the copied data, **Indicate in Excel** to open the file and select a range directly from the file, or **Custom Input** to enter the destination range manually. If the destination is a cell, the range is pasted starting with that cell.

Alternatively, you can select **Copy to clipboard** to copy the data to the clipboard. If you select this option, the data can only be pasted in another activity in the project (it cannot be pasted manually).
* **What to copy** - Select how to copy the data.
  + From the first dropdown, select the contents to copy. The following options are available: All (the default option), Values, Formulas, Formats.
  + From the second dropdown, select what to do with the first row in the source range.
    - **Exclude header** - Do not copy the first row regardless of the type of source range.
    - **Exclude header from source range only** - Do not copy the first row if the source is a range.
    - **Exclude header from source table only** - Do not copy the first row if the source is a table.
    - **Include header** - Copy the first row regardless of the type of source range.
* **Transpose** - If selected, the copied range is rotated (rows to columns and columns to rows). This option is not selected by default.

#### Properties panel

**Common**

* **DisplayName** - The name displayed for the activity in the Designer panel.

**Input**

* See the options in the body of the activity.

**Misc**

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.
