ChartSheetCollection.Add(String, ChartType) Method
Creates a new chart sheet of the specified type and under the specified name and appends it to the end of the collection.
A String value that specifies the chart sheet name.
A ChartType enumeration member specifying the chart type.
A ChartSheet object that specifies the new chart sheet.
When specifying a chart sheet name, take into account the following constraints:
- A chart sheet name must not be equal to an existing name in the sheet collection (IWorkbook.Sheets).
- A chart sheet name must not exceed 31 characters.
- A chart sheet name must not contain the following symbols: , /, ?, : ,*, [ or ]
- A chart sheet name must not start and end with a single quote (').
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 and adjust the chart appearance).
To insert a new chart sheet to the specified position in the collection, use the ChartSheetCollection.Insert method.