AutoFilter
Overview
AutoFilter is a class in Aspose.Cells FOSS for Python.
Represents auto filters in a worksheet.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
range | `` | Read | Gets or sets the filter range. |
filter_columns | `` | Read | Gets the collection of filter columns. |
sort_state | `` | Read | Gets or sets the sort state settings. |
Methods
| Signature | Description |
|---|---|
__init__() | Initializes a new instance of the AutoFilter class. |
set_range(start_row, start_col, end_row, end_col) | Sets the filter range using row and column indices. |
filter(col_index, values) | Applies a filter to a specific column. |
add_filter(col_index, value) | Adds a filter value to a specific column. |
custom_filter(col_index, operator, value) | Applies a custom filter to a specific column. |
filter_by_color(col_index, color, cell_color) | Applies a color filter to a specific column. |
filter_top10(col_index, top, percent, val) | Applies a top 10 filter to a specific column. |
filter_dynamic(col_index, filter_type, value) | Applies a dynamic filter to a specific column. |
clear_column_filter(col_index) | Clears the filter for a specific column. |
clear_all_filters() | Clears all filters. |
remove() | Removes the auto filter from the worksheet. |
show_filter_button(col_index, show) | Shows or hides the filter button for a specific column. |
sort(col_index, ascending) | Sets the sort order for a specific column. |
get_filter_column(col_index) | Gets the filter column for a specific column index. |
has_filter(col_index) | Checks if a specific column has filters applied. |