SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface MapOptions

    Options for IRange.map.

    interface MapOptions {
        axis?: TraversalAxis;
        blankRegions?: "each" | "once";
        bounds?: Partial<IRange.Coords>;
        coerce?: CoerceParams;
        errorOnInvalidCoercion?: boolean;
        includeEmpty?: boolean;
        onError?: "value" | "throw" | "ignore" | ((error: Known) => void);
        processColumnSkip?: (index: number, reverse?: boolean) => number;
        processRowSkip?: (index: number, reverse?: boolean) => number;
        reverse?: boolean;
        thisArg?: any;
        type?: ScalarType | null;
    }

    Hierarchy (View Summary)

    Index

    The direction of the iteration.

    IRange.Axis.Row

    If axis is set to 'fastest', the implementation will automatically choose the fastest axis for iteration based on the internal data layout of the range. This can provide performance benefits without requiring the caller to specify the axis, especially when the optimal axis is not known in advance.

    blankRegions?: "each" | "once"

    How the positions the range does not store are answered.

    'each'

    'each' is the sparse walk: an empty position is not visited (or, with includeEmpty, visited with its coordinates). 'once' calls the callback a single time for every empty position, with coords of { rowIndex: -1, colIndex: -1 } and the value an empty reads as, and every one of them takes that answer — the IRange.zip rule. Under 'once' a stretch of stored positions holding one value is also one call; a callback that reads only its value gets that on its own (it cannot tell), and one that reads coords opts in here.

    bounds?: Partial<IRange.Coords>

    The bounds of the iteration.

    The entire range

    coerce?: CoerceParams

    Overrides default coercion behavior per type. When a value cannot be coerced, onError determines the fallback.

    errorOnInvalidCoercion?: boolean

    If true, coercion failure produces #VALUE! rather than silently skipping the value.

    false

    includeEmpty?: boolean

    If true will visit empty cells. This is a potentially huge performance improvement if set to false.

    false

    If includeEmpty is true this will always return rectangular results. If bounds are provided it will provide empty spaces before and after. If passing a large bound care must be taken.

    onError?: "value" | "throw" | "ignore" | ((error: Known) => void)

    What to do when the visited value is a FormulaError.

    throw

    'throw' = throw error. 'ignore' = silently skip the value. 'value' = return a specific error value (default #VALUE!). 'function' = custom handler; use this to return a specific error value.

    processColumnSkip?: (index: number, reverse?: boolean) => number

    Skips columns of the range, as processRowSkip skips rows.

    processRowSkip?: (index: number, reverse?: boolean) => number

    Skips rows of the range: given the next row that would be read, answers the row to read instead - the same row when it is read, or the next one that is (the previous, when reverse).

    Type Declaration

      • (index: number, reverse?: boolean): number
      • Parameters

        • index: number

          The 0-based row about to be read.

        • Optionalreverse: boolean

          Whether the read runs from the last row back.

        Returns number

        The row to read, at or past index.

    A skipped cell is not visited, reads as empty and is left out of the statistics; the shape of the range is unchanged. SUBTOTAL reads a range this way when it skips hidden rows.

    reverse?: boolean

    Iterate in reverse order.

    false

    thisArg?: any

    Useful for callback functions that want a this.

    type?: ScalarType | null

    Specifies the target type for coercion and filtering when getting or iterating values.

    The scalar type of the IRange itself (getType())

    • Values matching the type pass through unchanged.
    • Values coercible to the type are coerced.
    • If not set, the range's own scalar type (getType()) is used.
    • If the range has no scalar type, or set to null explicitly, no coercion or filtering is performed.