.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

IWorkbook.ChartSheets Property

Provides access to a collection of chart sheets contained in the workbook.

Namespace: DevExpress.Spreadsheet

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

Declaration

ChartSheetCollection ChartSheets { get; }

Property Value

Type Description
ChartSheetCollection

A ChartSheetCollection object that is a collection of chart sheets.

Remarks

Use the ChartSheets property to get access to the ChartSheetCollection collection, which stores all chart sheets specified in a workbook. An individual ChartSheet can be accessed by its name or index in the collection.

To create a new chart sheet, use the ChartSheetCollection.Add method. To move an existing chart to a chart sheet, use the chart’s ChartObject.MoveToNewChartSheet method.

Use the ChartSheetCollection.Remove or ChartSheetCollection.RemoveAt method to remove a chart sheet from the collection.

The SheetCollection collection contains all sheets in a workbook (both chart sheets and worksheets). Use this collection when you need to access a sheet of any type by its name or index in the document.

Example

Dim worksheet As Worksheet = workbook.Worksheets("chartTask1")

' Create a chart sheet containing a pie chart.
Dim chartSheet As ChartSheet = workbook.ChartSheets.Add(ChartType.Pie, worksheet("B2:C7"))

workbook.ChartSheets.ActiveChartSheet = chartSheet

The following code snippets (auto-collected from DevExpress Examples) contain references to the ChartSheets property.

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