Version

ApplyCustomFilter(Int32,CustomFilterCondition,CustomFilterCondition,ConditionalOperator) Method

Applies a CustomFilter to the column.
Syntax
'Declaration
 
Public Overloads Function ApplyCustomFilter( _
   ByVal relativeColumnIndex As Integer, _
   ByVal condition1 As CustomFilterCondition, _
   ByVal condition2 As CustomFilterCondition, _
   ByVal conditionalOperator As ConditionalOperator _
) As CustomFilter

Parameters

relativeColumnIndex
A zero based column index relative to the Region
condition1
The first condition used to filter the data.
condition2
The second condition used to filter the data.
conditionalOperator
The operator which defines how to logically combine condition1 and condition2.
Exceptions
ExceptionDescription
System.ArgumentNullExceptioncondition1 is null.
System.ComponentModel.InvalidEnumArgumentExceptionconditionalOperator is not defined in the ConditionalOperator enumeration.
System.InvalidOperationExceptionIf the Region was not set.
System.ArgumentOutOfRangeExceptionIf the relativeColumnIndex is outside of the Region.
Remarks

If condition2 is null, the conditionalOperator value is irrelevant.

Note: If one of the filter condition values is longer than 255 characters in length and the workbook is saved in one of the 2003 formats, the correct rows will be hidden in the saved file, but the filter will be missing from the column.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also