PivotTableChangeList.Add Method
Adds a ValueChange object to the specified PivotTableChangeList collection.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function Add ( _
Tuple As String, _
Value As Double, _
AllocationValue As Object, _
AllocationMethod As Object, _
AllocationWeightExpression As Object _
) As ValueChange
'Usage
Dim instance As PivotTableChangeList
Dim Tuple As String
Dim Value As Double
Dim AllocationValue As Object
Dim AllocationMethod As Object
Dim AllocationWeightExpression As Object
Dim returnValue As ValueChange
returnValue = instance.Add(Tuple, Value, _
AllocationValue, AllocationMethod, _
AllocationWeightExpression)
ValueChange Add(
string Tuple,
double Value,
Object AllocationValue,
Object AllocationMethod,
Object AllocationWeightExpression
)
Parameters
Tuple
Type: System.StringThe MDX tuple of the value to change in the OLAP data source.
Value
Type: System.DoubleThe value to commit.
AllocationValue
Type: System.ObjectThe value to allocate when performing what-if analysis. If this parameter is not supplied, the default allocation value of the OLAP server will be used.
AllocationMethod
Type: System.ObjectThe method to use to allocate this value when performing what-if analysis. If this parameter is not supplied, the default allocation method of the OLAP server will be used.
AllocationWeightExpression
Type: System.ObjectThe MDX weight expression to use for this value when performing what-if analysis. If this parameter is not supplied, the default allocation weight expression of the OLAP server will be used.
Return Value
Type: Microsoft.Office.Interop.Excel.ValueChange
Returns ValueChange.
Remarks
The Add(String, Double, Object, Object, Object) method enables you to add ValueChange objects that represent changes to the PivotTable report through code. Doing so will add to the UPDATE CUBE statement that Excel constructs based on this change list. Note that if the user changes the allocation settings so that not all changes have the same settings, Excel will run multiple UPDATE CUBE statements, one for each group of changes that were made while the same settings were applied.