This documentation is archived and is not being maintained.

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)

'Usage
Dim Source As Object
Dim Rowcol As XlRowCol
Dim SeriesLabels As Object
Dim CategoryLabels As Object
Dim Replace As Object
Dim returnValue As Series
Dim seriesCollection1 As SeriesCollection
returnValue = seriesCollection1.Add(Source, Rowcol, SeriesLabels, CategoryLabels, Replace)

Series Add(
	[In] object Source, 
	[In, Optional] XlRowCol Rowcol, 
	[In, Optional] object SeriesLabels, 
	[In, Optional] object CategoryLabels, 
	[In, Optional] object Replace
);
public Series Add(
	/*in*/System.Object Source, 
	/*in*/XlRowCol Rowcol, 
	/*in*/System.Object SeriesLabels, 
	/*in*/System.Object CategoryLabels, 
	/*in*/System.Object Replace
);
function Add(
	 Source : Object, 
	 Rowcol : XlRowCol, 
	 SeriesLabels : Object, 
	 CategoryLabels : Object, 
	 Replace : Object
) : Series;

Parameters

Source

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

Rowcol

Optional XlRowCol. Specifies whether the new values are in the rows or columns of the specified range.

SeriesLabels

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

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

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.

This method is not available for PivotChart reports.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Show: