AutoFilter classe
AutoFilter classe
Rappresenta il filtraggio automatico per il foglio di lavoro specificato.
Il tipo AutoFilter espone i seguenti membri:
Proprietà
Proprietà | Descrizione |
---|---|
sorter | Ottiene l’ordinatore dei dati. |
range | Rappresenta l’intervallo a cui si applica il filtro automatico specificato. |
show_filter_button | Indica se il pulsante Filtro automatico per questa colonna è visibile. |
filter_columns | Ottiene la raccolta delle colonne filtro. |
Metodi
Esempio
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")
Guarda anche
- modulo
aspose.cells
- classe
CellArea