Partager via


PivotTable.AllocationWeightExpression Property

Gets or sets the MDX weight expression to use when performing what-if analysis on a PivotTable report based on an OLAP data source.

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

Syntax

'Declaration
Property AllocationWeightExpression As String
    Get
    Set
'Usage
Dim instance As PivotTable
Dim value As String

value = instance.AllocationWeightExpression

instance.AllocationWeightExpression = value
string AllocationWeightExpression { get; set; }

Property Value

Type: System.String
The MDX weight expression to use when performing what-if analysis on a PivotTable report based on an OLAP data source.

Remarks

Read/write.

The AllocationWeightExpression property corresponds to the Weight Expression setting in the What-If Analysis Settings dialog box. Before the AllocationWeightExpression property can be set, you must set the AllocationMethod property to xlWeightedAllocation.

See Also

Reference

PivotTable Interface

PivotTable Members

Microsoft.Office.Interop.Excel Namespace