# Change Pivot Data Source

> `UiPath.Excel.Activities.Business.ChangePivotDataSourceX`

`UiPath.Excel.Activities.Business.ChangePivotDataSourceX`

Changes the range of the source data for a specified pivot table. You can use this activity if the source range has been modified by adding or removing rows. If the source data has changed substantially, for example columns have been added or removed, you should [create a new pivot table](https://docs.uipath.com/activities/other/latest/productivity/create-pivot-table-x) instead. The activity can be used with an Excel file selected for a parent [Use Excel File](https://docs.uipath.com/activities/other/latest/productivity/excel-application-card) activity or with the Project Notebook.

## Configuring the activity

#### In the body of the activity

* **Pivot table** - Select **Plus** on the right side of the field, then select the Excel file and the name of the original pivot table. or select **Indicate in Excel** to open the file and indicate a cell from the pivot table. Alternatively, you can select **Custom Input** to enter the pivot table name manually, or **Open in Advanced Editor** to enter a VB expression.
* **New source** - Select **Plus** on the right side of the field and then, from the menu, select the Excel file and then either select a named range or table to use as the source of the pivot table, or select **Indicate in Excel** to indicate a range directly from the file. If you want to select an entire sheet, select **Indicate in Excel**, and then select all the columns you need (for example: A:F). Alternatively, you can select **Custom Input** to enter the range manually, or **Open in Advanced Editor** to enter a VB expression.

#### Properties panel

**Common**

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

**Input**

* See see options in the body of the activity.

**Misc**

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