AutoFiltersCollection module

class AutoFiltersCollection.AutoFiltersCollection

Bases: XlsAutoFiltersCollection

AddDateFilter
<summary>

Adds a date filter for a filter column.

</summary> <param name=”column”>The column field on which you want to base the filter . for exapmle: sheet.AutoFilters[0] </param> <param name=”dateTimeGroupingType”>

<see cref=”T:Spire.Xls.Core.Spreadsheet.AutoFilter.DateTimeGroupingType” />

</param>

<param name=”year”>The year.</param> <param name=”month”>The month.</param> <param name=”day”>The day.</param> <param name=”hour”>The hour.</param> <param name=”minute”>The minute.</param> <param name=”second”>The second.</param>

<remarks>

If DateTimeGroupingType is Year, only the param year effects. If DateTiemGroupingType is Month, only the param year and month effect. and so on. </remarks>

AddFillColorFilter
<summary>

Adds a fill color filter.

</summary> <param name=”column”>The column field on which you want to base the filter. for exapmle: sheet.AutoFilters[0] </param> <param name=”pattern”>The background pattern type.</param> <param name=”foregroundColor”>The foreground color.</param> <param name=”backgroundColor”>The background color.</param>

AddFilter
<summary>

Adds a filter for a filter column.

</summary> <param name=”column”>The column field on which you want to base the filter . for exapmle: sheet.AutoFilters[0] </param> <param name=”criteria”>The specified criteria (a string; for example, “hello”).

It only can be null or be one of the cells’ value in this column.

</param>

AddFontColorFilter
<summary>

Adds a font color filter.

</summary> <param name=”column”>The column field on which you want to base the filter. for exapmle: sheet.AutoFilters[0]</param> <param name=”color”>Font Color.</param>

AddIconFilter(columnIndex: int, iconSetType: IconSetType, iconId: int)
Clear()
ClearFilter
<summary>

Delete the column filter by column name

</summary> <param name=”columName”>column name</param>

CustomFilter
<summary>

Filters a list with a custom criteria.

</summary> <param name=”column”>The column field on which you want to base the filter . for exapmle: sheet.AutoFilters[0]</param> <param name=”operatorType”>The filter operator type</param> <param name=”criteria”>The custom criteria</param>

DynamicFilter
<summary>

Adds a dynamic filter.

</summary> <param name=”column”>The column field on which you want to base the filter. for exapmle: sheet.AutoFilters[0]</param> <param name=”dynamicFilterType”>Dynamic filter type.</param>

Filter
<summary>

Filter the data.

</summary>

FilterTop10
<summary>

Filter the top 10 item in the list

</summary> <param name=”filterColumnIndex”>The column field index on which you want to base the filter (from the left of the list; the leftmost field is field 0). </param> <param name=”isTop”>Indicates whether filter from top or bottom</param> <param name=”isPercent”>Indicates whether the items is percent or count </param> <param name=”itemCount”>The item count</param>

MatchBlanks
<summary>

Match all blank cell in the list.

</summary> <param name=”column”>The column field on which you want to base the filter . for exapmle: sheet.AutoFilters[0]</param>

MatchNonBlanks
<summary>

Match all not blank cell in the list.

</summary> <param name=”filterColumnIndex”>The column field index on which you want to base the filter (from the left of the list; the leftmost field is field 0).</param>

QuickFilter
<summary>

Filters a list with specified criteria.

</summary> <param name=”column”>The column field on which you want to base the filter . for exapmle: sheet.AutoFilters[0] </param> <param name=”criteria”>The specified criteria (a string; for example, “hello”). </param>

<remarks>

will remove all other filter setting on this field as Ms Excel 97-2003. </remarks>

property Range: CellRange
<summary>

Range to be filtered.

</summary>

RemoveDateFilter(columnIndex: int, dateTimeGroupingType: DateTimeGroupingType, year: int, month: int, day: int, hour: int, minute: int, second: int)
<summary>

Removes a date filter.

</summary> <param name=”column”>The column field on which you want to base the filter . for exapmle: sheet.AutoFilters[0] </param> <param name=”dateTimeGroupingType”>

<see cref=”T:Spire.Xls.Core.Spreadsheet.AutoFilter.DateTimeGroupingType” />

</param>

<param name=”year”>The year.</param> <param name=”month”>The month.</param> <param name=”day”>The day.</param> <param name=”hour”>The hour.</param> <param name=”minute”>The minute.</param> <param name=”second”>The second.</param>

<remarks>

If DateTimeGroupingType is Year, only the param year effects. If DateTiemGroupingType is Month, only the param year and month effect. </remarks>

RemoveFilter(columnIndex: int, criteria: str)
<summary>

Removes a filter for a filter column.

</summary> <param name=”column”>The column field on which you want to base the filter . for exapmle: sheet.AutoFilters[0] </param> <param name=”criteria”>The specified criteria (a string; for example, “hello”).

It only can be null or be one of the cells’ value in this column.

</param>

property Worksheet: Worksheet
<summary>

Returns parent worksheet. Read-only.

</summary>