NamedRange::DataSeries Method (Object^, XlDataSeriesType, XlDataSeriesDate, Object^, Object^, Object^)

 

Creates a data series in the NamedRange control.

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

Object^ DataSeries(
	Object^ Rowcol,
	XlDataSeriesType Type = XlDataSeriesType::xlDataSeriesLinear,
	XlDataSeriesDate Date = XlDataSeriesDate::xlDay,
	Object^ Step,
	Object^ Stop,
	Object^ Trend
)

Parameters

Rowcol
Type: System::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
Type: Microsoft.Office.Interop.Excel::XlDataSeriesType

Can be one of the following XlDataSeriesType constants:

xlAutoFill

xlDataSeriesLinear

xlChronological

xlGrowth

Date
Type: Microsoft.Office.Interop.Excel::XlDataSeriesDate

If the Type argument is xlChronological, the Date argument indicates the step date unit.

Can be one of the following XlDataSeriesDate constants:

xlDay

xlWeekday

xlMonth

xlYear

Step
Type: System::Object^

The step value for the series. The default value is 1 (one).

Stop
Type: System::Object^

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

Trend
Type: System::Object^

true to create a linear trend or growth trend; false to create a standard data series. The default value is false.

Return Value

Type: System::Object^

For information on optional parameters, see Optional Parameters in Office Solutions.

The following code example creates a series of twelve dates. The series contains the last day of every month in 1996.

This example is for a document-level customization.

No code example is currently available or this language may not be supported.
Return to top
Show: