跳到主要内容

ApiAutoFilter

Represents the ApiAutoFilter class.

Properties

NameTypeDescription
FilterModebooleanReturns a value that indicates whether the worksheet has an AutoFilter applied.
FiltersApiFilter[]Returns the array of ApiFilter objects that represents the filters applied to the range.
ParentApiWorksheetReturns the ApiWorksheet object that contains the AutoFilter.
RangeApiRange | nullReturns the ApiRange object that represents the AutoFilter range; null if no AutoFilter is defined.

Methods

MethodReturnsDescription
ApplyFiltervoidReapplies the AutoFilter to the worksheet using the existing filter criteria. This method corresponds to the Excel AutoFilter.ApplyFilter behavior: it does not change the currently defined filter conditions; it only reevaluates which rows should be visible based on the active filters. If no AutoFilter is defined for the worksheet, the method does nothing.
GetFilterModebooleanReturns a value that indicates whether the worksheet has an AutoFilter applied.
GetFiltersApiFilter[]Returns the array of ApiFilter objects that represents the filters applied to the AutoFilter range.
GetParentApiWorksheetReturns the parent ApiWorksheet object for the AutoFilter.
GetRangeApiRange | nullReturns the ApiRange object that represents the AutoFilter range.
ShowAllDatavoidClears all filters and displays all rows in the AutoFilter range. This method corresponds to the Excel AutoFilter.ShowAllData behavior: it removes any active filtering from the worksheet while preserving the AutoFilter drop-downs on the header row. If no AutoFilter is defined for the worksheet, the method does nothing.