SheetXL - v0.3.20
    Preparing search index...

    Interface IAutoSort

    Capabilities for applying and managing sorting on a range.

    AutoSort enables dynamic sorting of data based on criteria specified per column, allowing users to organize and arrange information effectively.

    Key features include:

    • Sorting one or more columns within a range.
    • Specifying sort order (ascending or descending) for each column.
    • Applying custom sort options (e.g., case sensitivity).
    • Clearing or modifying sort.
    interface IAutoSort {
        apply(fields: Field[]): IAutoSort;
        clear(): IAutoSort;
        delete(): void;
        getFieldAt(offset: number): Criteria;
        getRange(): IRange.Coords;
        reapply(): IAutoSort;
        setFieldAt(offset: number, field: Criteria): IAutoSort;
        toJSON(): JSON;
    }
    Index

    Methods

    • Set all field fields.

      Parameters

      • fields: Field[]

      Returns IAutoSort

    • Remove the current sort.

      Returns IAutoSort

      This is a convenience methods that does the same thing that setFields with an empty array does.

    • Delete this sort.

      Returns void

    • Returns the current fields or an empty array if nothing is sorted.

      Parameters

      • offset: number

      Returns Criteria

    • Updates the current sort fields.

      Parameters

      • offset: number

        Offset relative to the sort.

      • field: Criteria

        The field to sort.

      Returns IAutoSort

    • Returns persistable state.

      Returns JSON