PivotTableChangeList.Add(String, Double, Object, Object, Object) Method

Definition

Adds a ValueChange object to the specified PivotTableChangeList collection.

public Microsoft.Office.Interop.Excel.ValueChange Add (string Tuple, double Value, object AllocationValue, object AllocationMethod, object AllocationWeightExpression);
Public Function Add (Tuple As String, Value As Double, Optional AllocationValue As Object, Optional AllocationMethod As Object, Optional AllocationWeightExpression As Object) As ValueChange

Parameters

Tuple
String

The MDX tuple of the value to change in the OLAP data source.

Value
Double

The value to commit.

AllocationValue
Object

The 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
Object

The 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
Object

The 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.

Returns

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.

Applies to