Exposes methods to identify a region in the wroksheet and to apply sort criteria to that region.

WorksheetSortSettings

new WorksheetSortSettings(a: Worksheet, b: object): WorksheetSortSettings

Returns WorksheetSortSettings

Inherited from: RelativeIndexSortSettings

Gets or sets the value which indicates whether strings should be compared case-sensitively when they are sorted.

get caseSensitive(): boolean

Returns boolean

set caseSensitive(a: boolean): void

Parameters

  • a: boolean

Returns void

Returns the region that the filter settings is applied to (read-only).

get region(): WorksheetRegion

Returns WorksheetRegion

Determines whether columns or rows will be sorted within the region. 'Rows' is the default. Note: when this property is changed all existing sort conditions will be cleared so this property should be set before sort conditions are added.

get sortType(): WorksheetSortType

Returns WorksheetSortType

set sortType(a: WorksheetSortType): void

Parameters

Returns void

Clears the region as well as any existing sort criteria

clearRegion(): void

Returns void

Re-sorts all data cells in the region based on the sort conditions.

reapplySortConditions(): void

Returns void

Sets the region where the filter settings should be applied

setRegion(address: string): void

Parameters

  • address: string

    The address of the new region.

Returns void

Inherited from: RelativeIndexSortSettings

Gets or sets the sort condition for the specified sort-able item.

sortConditions(sortableItem: RelativeIndex, value: SortCondition): SortCondition

Parameters

Returns SortCondition