HotXLS Docs

AutoFilterColumns property

Returns the classic XLS AutoFilter field collection for the worksheet. Read-only.

Syntax

property AutoFilterColumns: TXLSAutofilter;

Remarks

The collection uses 1-based field indexes matching the visible AutoFilter columns. Count returns the number of filtered columns in the current range. Items[Field] returns a TXLSAutofilterItem for that field or nil when the field index is outside the current range.
Each item exposes Active, Operator, Criteria1, and Criteria2. Criteria objects expose the stored BIFF8 DOPER DataType, grbitSgn, and Value.

Example

Sheet.ApplyAutoFilter('A1:C5', 2, '>=100');
FilterItem := Sheet.AutoFilterColumns[2];
if Assigned(FilterItem) and FilterItem.Active then
  CriteriaValue := FilterItem.Criteria1.Value;

See Also