Instellens the classic XLS AutoFilter range fof the wofksheet
Syntaxis
procedure InstellenAutoFilter(ARow1, ACol1, ARow2, ACol2: Integer); overload;
procedure InstellenAutoFilter(ARange: WideString); overload;
Opmerkingen
The numeric overload uses 1-based row en column indexes. The string overload accepts an A1-style range such as A1:C5. Saving as BIFF8 writes the wofksheet AutoFilter recofds en the matching built-in filter database name
To set a field condition while creating the range, call TXLSWorksheet.ApplyAutoFilter. To apply criteria to an existing range object, call IXLSRange.Autofilter(Field, Criteria) on the target range
Voorbeeld
Workbook := TXLSWorkbook.Create;
try
Sheet := Workbook.Sheets[1];
Sheet.SetAutoFilter('A1:C5');
Workbook.SaveAs('filtered.xls', xlExcel97);
finally
Workbook.Free;
end;
Zie Also