SheetXL - v0.3.20
    Preparing search index...

    Interface Options

    Options for sorting with a filter.

    This is very similar to a range sort but with a few less options.

    interface Options {
        collatorOptions?: CollatorOptions | Record<ScalarType, CollatorOptions>;
        customList?: string;
        dxfId?: any;
        fields?: (number | Field)[];
        iconId?: number;
        iconSet?: IStyle.IconSet;
        offset?: number;
        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
    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.

    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.

    offset?: number

    0-based offset for the header based on orientation

    The first index of the selected range
    
    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