PivotFilters.Add Method
Adds new filters to the PivotFilters collection.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function Add ( _
Type As XlPivotFilterType, _
DataField As Object, _
Value1 As Object, _
Value2 As Object, _
Order As Object, _
Name As Object, _
Description As Object, _
MemberPropertyField As Object _
) As PivotFilter
'Usage
Dim instance As PivotFilters
Dim Type As XlPivotFilterType
Dim DataField As Object
Dim Value1 As Object
Dim Value2 As Object
Dim Order As Object
Dim Name As Object
Dim Description As Object
Dim MemberPropertyField As Object
Dim returnValue As PivotFilter
returnValue = instance.Add(Type, DataField, _
Value1, Value2, Order, Name, Description, _
MemberPropertyField)
PivotFilter Add(
XlPivotFilterType Type,
Object DataField,
Object Value1,
Object Value2,
Object Order,
Object Name,
Object Description,
Object MemberPropertyField
)
Parameters
Type
Type: Microsoft.Office.Interop.Excel.XlPivotFilterTypeRequired Requires a XlPivotFilterType type of filter.
DataField
Type: System.ObjectOptional Object The field to which the filter is attached.
Value1
Type: System.ObjectOptional Object Filter value 1.
Value2
Type: System.ObjectOptional Object Filter value 2.
Order
Type: System.ObjectOptional Object Order in which the data should be filtered.
Name
Type: System.ObjectOptional Object Name of the filter.
Description
Type: System.ObjectOptional Object A brief description of the filter.
MemberPropertyField
Type: System.ObjectOptional Object Specifies the member property field on which the label filter is based.
Return Value
Type: Microsoft.Office.Interop.Excel.PivotFilter
PivotFilter