HotXLS-dokumentation

AutoFilterColumns egenskab

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

Syntaks

property AutoFilterColumns: TXLSAutofilter;

Bemærkninger

Samlingen bruger 1-baserede feltindeks, der svarer til de synlige AutoFilter-kolonner Count returns the number of filtered columns in the current range. Items[Field] and Find(Field) return 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

Eksempel

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

See Also