Skip to main content

How to: Remove a Chart Sheet

To delete a chart sheet from a workbook, remove it from the workbook’s ChartSheetCollection by using the ChartSheetCollection.Remove or ChartSheetCollection.RemoveAt method.

You can also move a chart back to the worksheet containing the source data by using the chart’s ChartObject.MoveToWorksheet method.

View Example

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

// Create the first chart sheet.

// Create the second chart sheet.
workbook.ChartSheets.Add(ChartType.Pie, worksheet["B2:C7"]);

// Remove the first chart sheet.