The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

How to: Move a Pivot Table

  • 2 min to read

To move a PivotTable report, use the PivotTable.MoveTo method. You can place a pivot table in another location in the existing worksheet or move it to a new worksheet.


If a cell range where you wish to place your report is a regular range containing data, it will be overwritten without warning. But if the destination cell range contains a pivot table or table, the System.InvalidOperationException will be thrown since the pivot table cannot overlap another table or a PivotTable report.

Move a Pivot Table to Another Location in the Existing Worksheet

Worksheet worksheet = workbook.Worksheets["Report1"];
workbook.Worksheets.ActiveWorksheet = worksheet;

// Change the pivot table location.
// Refresh the pivot table.

Move a Pivot Table to a New Worksheet

Worksheet worksheet = workbook.Worksheets["Report1"];

// Create a new worksheet.
Worksheet targetWorksheet = workbook.Worksheets.Add();

// Access the pivot table by its name in the collection
// and move it to the new worksheet.
// Refresh the pivot table.

workbook.Worksheets.ActiveWorksheet = targetWorksheet;