Edit

Share via


Range.DataSeries Method

Definition

Creates a data series in the specified range.

public object DataSeries (object Rowcol, Microsoft.Office.Interop.Excel.XlDataSeriesType Type = Microsoft.Office.Interop.Excel.XlDataSeriesType.xlDataSeriesLinear, Microsoft.Office.Interop.Excel.XlDataSeriesDate Date = Microsoft.Office.Interop.Excel.XlDataSeriesDate.xlDay, object Step, object Stop, object Trend);
Public Function DataSeries (Optional Rowcol As Object, Optional Type As XlDataSeriesType = Microsoft.Office.Interop.Excel.XlDataSeriesType.xlDataSeriesLinear, Optional Date As XlDataSeriesDate = Microsoft.Office.Interop.Excel.XlDataSeriesDate.xlDay, Optional Step As Object, Optional Stop As Object, Optional Trend As Object) As Object

Parameters

Rowcol
Object

Optional Object. Can be the xlRows or xlColumns constant to have the data series entered in rows or columns, respectively. If this argument is omitted, the size and shape of the range is used.

Type
XlDataSeriesType

Optional XlDataSeriesType. Can be one of the following XlDataSeriesType constants:xlAutoFillxlDataSeriesLineardefaultxlChronologicalxlGrowth

Date
XlDataSeriesDate

Optional XlDataSeriesDate. If the Type argument is xlChronological, the Date argument indicates the step date unit. Can be one of the following XlDataSeriesDate constants:xlDaydefaultxlWeekdayxlMonthxlYear

Step
Object

Optional Object. The step value for the series. The default value is 1.

Stop
Object

Optional Object. The stop value for the series. If this argument is omitted, Microsoft Excel fills to the end of the range.

Trend
Object

Optional Object. True to create a linear trend or growth trend; False to create a standard data series. The default value is False.

Returns

Applies to