Exposes methods to identify a region in the wroksheet and to apply filters and optionally sort criteria to that region.
Constructors
Section titled "Constructors"WorksheetFilterSettings
new WorksheetFilterSettings(a: Worksheet, b: boolean): WorksheetFilterSettings Returns WorksheetFilterSettings
Properties
Section titled "Properties"$t: Type Accessors
Section titled "Accessors"region
Section titled "region"Returns the total region including the filter headers (read-only).
get region(): WorksheetRegion Returns WorksheetRegion
sortAndFilterAreaRegion
Section titled "sortAndFilterAreaRegion"Returns the region that the filters and sort settings are applied to (read-only).
get sortAndFilterAreaRegion(): WorksheetRegion Returns WorksheetRegion
sortSettings
Section titled "sortSettings"Gets the settings which determine how the data within the worksheet's filer region should be sorted.
get sortSettings(): RelativeIndexSortSettings Returns RelativeIndexSortSettings
Methods
Section titled "Methods"applyAverageFilter
Section titled "applyAverageFilter"Applies an [[AverageFilter]] to the column.
applyAverageFilter(relativeColumnIndex: number, type: AverageFilterType): AverageFilter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
- type:
AverageFilterTypeThe value indicating whether to filter in values below or above the average of the data range.
Returns AverageFilter
applyCustomFilter
Section titled "applyCustomFilter"Applies a [[CustomFilter]] to the column.
applyCustomFilter(relativeColumnIndex: number, condition: CustomFilterCondition): CustomFilter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
- condition:
CustomFilterConditionThe condition which must pass for the data to be filtered in.
Returns CustomFilter
applyDatePeriodFilter
Section titled "applyDatePeriodFilter"Applies an [[DatePeriodFilter]] to the column.
applyDatePeriodFilter(relativeColumnIndex: number, type: DatePeriodFilterType, value: number): DatePeriodFilter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
- type:
DatePeriodFilterTypeThe type of date period to filter in.
- value:
numberThe 1-based value of the month or quarter to filter in.
Returns DatePeriodFilter
applyFillFilter
Section titled "applyFillFilter"Applies a [[FillFilter]] to the column.
applyFillFilter(relativeColumnIndex: number, fill: CellFill): FillFilter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
- fill:
CellFillA [[CellFill]] by which the cells should be filtered.
Returns FillFilter
applyFixedValuesFilter
Section titled "applyFixedValuesFilter"Applies a [[FixedValuesFilter]] to the column.
applyFixedValuesFilter(relativeColumnIndex: number, includeBlanks: boolean, calendarType: CalendarType, dateGroups: FixedDateGroup[]): FixedValuesFilter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
- includeBlanks:
booleanThe value which indicates whether blank cells should be filtered in.
- calendarType:
CalendarTypeThe calendar type used to interpret values in the 'dateGroups' collection.
- dateGroups:
FixedDateGroup[]The collection of fixed date groups which should be filtered in.
Returns FixedValuesFilter
applyFontColorFilter
Section titled "applyFontColorFilter"Applies a [[FontColorFilter]] to the column.
applyFontColorFilter(relativeColumnIndex: number, fontColorInfo: WorkbookColorInfo): FontColorFilter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
- fontColorInfo:
WorkbookColorInfoA [[WorkbookColorInfo]] which describes the font color by which the cells should be filtered.
Returns FontColorFilter
applyIconFilter
Section titled "applyIconFilter"Applies a [[IconFilter]] to the column.
applyIconFilter(relativeColumnIndex: number, iconSet: FormatConditionIconSet, iconIndex: number): IconFilter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
- iconSet:
FormatConditionIconSetThe icon set containing the icon.
- iconIndex:
numberThe zero-based index of the icon in the set or null for 'NoCellIcon'.
Returns IconFilter
applyRelativeDateRangeFilter
Section titled "applyRelativeDateRangeFilter"Applies a [[RelativeDateRangeFilter]] to the column.
applyRelativeDateRangeFilter(relativeColumnIndex: number, offset: RelativeDateRangeOffset, duration: RelativeDateRangeDuration): RelativeDateRangeFilter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
- offset:
RelativeDateRangeOffsetThe offset of relative filter. This combined with the 'duration' determines the full range of accepted dates.
- duration:
RelativeDateRangeDurationThe duration of the full range of accepted dates.
Returns RelativeDateRangeFilter
applyTopOrBottomFilter
Section titled "applyTopOrBottomFilter"Applies a [[TopOrBottomFilter]] to the column which will filter in the top 10 values in the list of sorted values.
applyTopOrBottomFilter(relativeColumnIndex: number): TopOrBottomFilter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
Returns TopOrBottomFilter
applyYearToDateFilter
Section titled "applyYearToDateFilter"Applies a [[YearToDateFilter]] to the column.
applyYearToDateFilter(relativeColumnIndex: number): YearToDateFilter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
Returns YearToDateFilter
clearFilter
Section titled "clearFilter"Clears the filter that is applied to a specific column.
clearFilter(relativeColumnIndex: number): void Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
Returns void
clearFilters
Section titled "clearFilters"Clears all previously applied filters
clearFilters(): void Returns void
clearRegion
Section titled "clearRegion"Clears the region as well as any existing filters and sort criteria
clearRegion(): void Returns void
getFilter
Section titled "getFilter"Gets the filter that is applied to a specific column.
getFilter(relativeColumnIndex: number): Filter Parameters
- relativeColumnIndex:
numberA zero based column index relative to the [[region]]
Returns Filter
reapplyFilters
Section titled "reapplyFilters"Re-filters all data cells in the filter region based on the applied filters.
reapplyFilters(): void Returns void
reapplySortConditions
Section titled "reapplySortConditions"Re-sorts all data cells in the region based on the sort conditions.
reapplySortConditions(): void Returns void
setRegion
Section titled "setRegion"Sets the region where the filter settings should be applied
setRegion(address: string): void Parameters
- address:
stringThe address of the new region.
Returns void
staticInit
Section titled "staticInit"staticInit(): void