Interface RangeSortOptions

Options for sorting a range.

interface RangeSortOptions {
    ascending?: boolean;
    dataOptions?: any;
    description?: string;
    fields?: SortField[];
    hasHeader?: boolean;
    includeHiddenHeaders?: boolean;
    offset?: number;
    orientation?: RangeOrientation;
    preserveMerges?: boolean;
}

Hierarchy (view full)

Properties

ascending?: boolean

Ascending is smallest to largest

Default Value

true
dataOptions?: any

Additional options for sorting

Remarks

  • Excel has a matchCase flag but we use Intl.CollatorOptions
  • Excel has Normal | 'TextAsNumber' but we use Intl.CollatorOptions
description?: string

Used for undo/redo/collaboration/version

fields?: SortField[]

Allows you to override individual sorts for each additional level. All sort criteria default to the sort criteria specified on the sort option.

hasHeader?: boolean

Default Value

true
includeHiddenHeaders?: boolean

Determine if sort should honor hidden headers.

Default Value

false

Remarks

The sort function does not but the UI does.

offset?: number

0-based offset for the header based on orientation

Default Value

The first index of the selected range
orientation?: RangeOrientation

Default Value

RangeOrientation.Rows
preserveMerges?: boolean

Determine the behavior of sorting merged cells. By default merged cells will sort with their merges intact but sorting will be limited to sorting with all merges of the same size.

Default Value

true