AutoFilter

Overview

AutoFilter is a class in Aspose.Cells FOSS for Python.

Represents auto filters in a worksheet.

Properties

NameTypeAccessDescription
range``ReadGets or sets the filter range.
filter_columns``ReadGets the collection of filter columns.
sort_state``ReadGets or sets the sort state settings.

Methods

SignatureDescription
__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.

See Also