Compartilhar via


SeriesCollection.Add Method

Adds one or more new series to the SeriesCollection collection.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Add ( _
    Source As Object, _
    Rowcol As XlRowCol, _
    SeriesLabels As Object, _
    CategoryLabels As Object, _
    Replace As Object _
) As Series
'Usage
Dim instance As SeriesCollection
Dim Source As Object
Dim Rowcol As XlRowCol
Dim SeriesLabels As Object
Dim CategoryLabels As Object
Dim Replace As Object
Dim returnValue As Series

returnValue = instance.Add(Source, Rowcol, _
    SeriesLabels, CategoryLabels, Replace)
Series Add(
    Object Source,
    XlRowCol Rowcol,
    Object SeriesLabels,
    Object CategoryLabels,
    Object Replace
)

Parameters

  • Source
    Type: System.Object

    Required Object. The new data, either as a Range object or an array of data points.

  • SeriesLabels
    Type: System.Object

    Optional Object. Ignored if Source is an array. True if the first row or column contains the name of the data series. False if the first row or column contains the first data point of the series. If this argument is omitted, Microsoft Excel attempts to determine the location of the series name from the contents of the first row or column.

  • CategoryLabels
    Type: System.Object

    Optional Object. Ignored if Source is an array. True if the first row or column contains the name of the category labels. False if the first row or column contains the first data point of the series. If this argument is omitted, Microsoft Excel attempts to determine the location of the category label from the contents of the first row or column.

  • Replace
    Type: System.Object

    Optional Object. If CategoryLabels is True and Replace is True, the specified categories replace the categories that currently exist for the series. If Replace is False, the existing categories will not be replaced. The default value is False.

Return Value

Type: Microsoft.Office.Interop.Excel.Series

Remarks

This method is not available for PivotChart reports.

See Also

Reference

SeriesCollection Interface

SeriesCollection Members

Microsoft.Office.Interop.Excel Namespace