CubeFields.AddSet Method
Adds a new CubeField object to the CubeFields collection.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function AddSet ( _
Name As String, _
Caption As String _
) As CubeField
'Usage
Dim instance As CubeFields
Dim Name As String
Dim Caption As String
Dim returnValue As CubeField
returnValue = instance.AddSet(Name, Caption)
CubeField AddSet(
string Name,
string Caption
)
Parameters
Name
Type: System.StringRequired String. A valid name in the SETS schema rowset.
Caption
Type: System.StringRequired String. A string representing the field that will be displayed in the PivotTable view.
Return Value
Type: Microsoft.Office.Interop.Excel.CubeField
Remarks
The CubeField object corresponds to a set defined on the Online Analytical Processing (OLAP) a provider for the cube.
If a set with the name given in the argument Name does not exist, the AddSet method will return a run-time error.