ExcelAutoFilterFilterByConditions Method |
Shows only the rows whose cell in the specified column meets two conditions joined by And or Or, for
example greater than or equal to 10 And less than 20. The filter replaces the previous filter of the
column; the filters of the other columns are kept.
Namespace: ExpertXls.ExcelLibAssembly: expertxls (in expertxls.dll) Version: 10.0.0
Syntaxpublic void FilterByConditions(
int columnIndex,
ExcelAutoFilterOperator operator1,
Object value1,
bool and,
ExcelAutoFilterOperator operator2,
Object value2
)
Public Sub FilterByConditions (
columnIndex As Integer,
operator1 As ExcelAutoFilterOperator,
value1 As Object,
and As Boolean,
operator2 As ExcelAutoFilterOperator,
value2 As Object
)
Parameters
- columnIndex Int32
- The one based index of the column in the filtered range.
- operator1 ExcelAutoFilterOperator
- The comparison operator of the first condition.
- value1 Object
- The value of the first condition: a number is compared with the numbers of the column,
any other value is compared as text, without regard to case.
- and Boolean
- True to show the rows that meet both conditions, false to show the rows that meet at
least one of them.
- operator2 ExcelAutoFilterOperator
- The comparison operator of the second condition.
- value2 Object
- The value of the second condition.
See Also