officefileapi-devexpress-dot-spreadsheet-dot-chartsheetcollection-dot-add-x28-system-dot-string-x29.md
Creates a new chart sheet under the specified name and appends it to the end of the collection.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
ChartSheet Add(
string name
)
Function Add(
name As String
) As ChartSheet
| Name | Type | Description |
|---|---|---|
| name | String |
A String value that specifies the chart sheet name.
|
| Type | Description |
|---|---|
| ChartSheet |
A ChartSheet object that specifies the new chart sheet.
|
When specifying a chart sheet name, take into account the following constraints:
If the name parameter is an empty string, a new chart sheet is created under the default name like ChartN, where N is a number that is greater by 1 than the maximum number used in chart sheet names of the same type. To change the chart sheet name, use the ChartSheet.Name property. Use the ChartSheet.Chart property to access a chart located on the chart sheet and specify its settings (select chart data, change the chart type and adjust its appearance). By default, a chart sheet created by the current Add method overload contains an empty chart of the ChartType.ColumnClustered type.
To insert a new chart sheet to the specified position in the collection, use the ChartSheetCollection.Insert method.
To remove a chart sheet from the collection, use the ChartSheetCollection.Remove or ChartSheetCollection.RemoveAt method.
See Also