SheetXL - v0.3.20
    Preparing search index...

    Interface RangeOptions

    Extends sort options to include options for sorting a range.

    This include orientation, hasHeader, and includeHidden.

    interface RangeOptions {
        collatorOptions?: CollatorOptions | Record<ScalarType, CollatorOptions>;
        collators?: readonly Collator[];
        customList?: string;
        dxfId?: any;
        fields?: (number | Field)[];
        hasHeader?: boolean;
        iconId?: number;
        iconSet?: IStyle.IconSet;
        includeHidden?: boolean;
        offset?: number;
        orientation?: IRange.Orientation;
        reverse?: boolean;
        sortOn?: SortOn;
    }

    Hierarchy (View Summary)

    Index

    Properties

    collatorOptions?: CollatorOptions | Record<ScalarType, CollatorOptions>

    Additional options for sorting.

    • Excel has a matchCase flag but we use Intl.CollatorOptions
    • Excel has Normal | 'TextAsNumber' but we use Intl.CollatorOptions
    collators?: readonly Collator[]

    Override the collators used.

    Sort.DefaultCollators
    
    customList?: string

    Sort by a custom list.

    PLACEHOLDER - This is a placeholder for future use.

    dxfId?: any

    Used with sortOn === cellColor or fontColor

    PLACEHOLDER - This is a placeholder for future use.

    fields?: (number | Field)[]

    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

    Indicate if the sort has a header. If the sort has a head this will be ignored.

    Use data to make a 'guess'
    
    iconId?: number

    Used with sortOn === Icon

    PLACEHOLDER - This is a placeholder for future use.

    iconSet?: IStyle.IconSet

    Used with sortOn === Icon

    PLACEHOLDER - This is a placeholder for future use.

    includeHidden?: boolean

    Determine if sort should include values that are hidden.

    false
    
    offset?: number

    0-based offset for the header based on orientation

    The first index of the selected range
    
    orientation?: IRange.Orientation

    Indicate the orientation to sort.

    ICellRange.Orientation.Row
    
    reverse?: boolean

    Determines whether to reverse the default sort order.

    false - (sorts in the default order, typically ascending)
    

    The reverse flag flips the sort order. When set to true, the sort will be performed in reverse order compared to the default (which is usually ascending).

    This flag is data-type agnostic, meaning it will reverse the default order regardless of whether the data is numeric, alphabetic, or complex (e.g., booleans, lists).

    Example usage:

    const options: ISort.Options = {
    reverse: true, // Sorts in descending order (for numbers/alphabetic)
    };
    sortOn?: SortOn

    Only value is currently supported