Skip to main content
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ChartSheetCollection.RemoveAt(Int32) Method

Removes the chart sheet at the specified position from the collection.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

void RemoveAt(
    int index
)

#Parameters

Name Type Description
index Int32

An integer that is the zero-based index of a chart sheet to be deleted from a workbook.

#Remarks

The RemoveAt method disposes of an element removed from the collection. To remove the specified chart sheet from the collection, use the ChartSheetCollection.Remove method. You can also hide a chart sheet using the ChartSheet.Visible or ChartSheet.VisibilityType property.

Note

A workbook must always contain at least one visible sheet.

To add a chart sheet to a workbook, use the ChartSheetCollection.Add or ChartSheetCollection.Insert method.

#Example

View Example

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

// Create the first chart sheet.
workbook.ChartSheets.Add();

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

// Remove the first chart sheet.
workbook.ChartSheets.RemoveAt(0);

The following code snippets (auto-collected from DevExpress Examples) contain references to the RemoveAt(Int32) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also