[]
Represents a filter for a single column.
The IFilter object is a member of the IFilters collection. The IFilters collection contains all the filters in an autofiltered range.
public interface IFilter
Public Interface IFilter
worksheet.Range["A1:B4"].Value = new object[,] {
{"Region", "Value"},
{"East", 100},
{"West", 200},
{"East", 300}
};
worksheet.Range["A1:B4"].AutoFilter(0, "East");
IFilter filter = worksheet.AutoFilter.Filters[0];
object criteria1 = filter.Criteria1;
| Name | Description |
|---|---|
| Criteria1 | Gets the first filter criterion for the specified column in a filtered range. This value corresponds to the first criterion applied to the filter for the column. |
| Criteria2 | Gets the second filter criterion for the specified column in a filtered range. This value represents the second criterion in a compound filter and is used together with Criteria1 and Operator. |
| On | Gets whether the specified filter is enabled. This property indicates whether the filter for the current column is enabled in the worksheet's auto filter. |
| Operator | Gets the operator that connects the two criteria used by the specified filter. Use this value to determine how the filter combines its criteria, such as And or Or. |