AutoFilter clase
AutoFilter clase
Representa el filtrado automático para la hoja de trabajo especificada.
El tipo AutoFilter expone los siguientes miembros:
Propiedades
Propiedad | Descripción |
---|---|
sorter | Obtiene el clasificador de datos. |
range | Representa el rango al que se aplica el filtro automático especificado. |
show_filter_button | Indica si el botón Autofiltro para esta columna está visible. |
filter_columns | Obtiene la colección de las columnas de filtro. |
Métodos
Ejemplo
from aspose.cells import Workbook
# Creating a file stream containing the Excel file to be opened
# Instantiating a Workbook object
workbook = Workbook("template.xlsx")
# Accessing the first worksheet in the Excel file
worksheet = workbook.worksheets[0]
# Creating AutoFilter by giving the cells range of the heading row
worksheet.auto_filter.range = "A1:B1"
# Filtering columns with specified values
worksheet.auto_filter.filter(1, "Bananas")
# Saving the modified Excel file.
workbook.save("output.xls")
Ver también
- módulo
aspose.cells
- clase
CellArea