SheetXL - v0.3.20
    Preparing search index...

    Interface ICellHeaderRange

    Represents a collection of ICellHeaders.

    interface ICellHeaderRange {
        isICellHeaderRange: true;
        at(index: number): ICellHeader;
        clear(): this;
        doBatch<R>(
            callback: (commit: ICommit) => R | Promise<R>,
            options?: string | UpdateHeadersOptions,
        ): R | Promise<R>;
        forEach<T = any>(
            callback: ICellHeaderRange.ForEachCallback<T>,
            options?: IteratorOptions,
        ): void | T;
        forEachSpan<T = any>(
            callback: ForEachSpanCallback<T>,
            options?: IteratorOptions,
        ): void | T;
        forEachVisibleSpan<T = any>(
            callback: ForEachVisibleSpanCallback<T>,
            options?: ForEachVisibleSpanOptions,
        ): void | T;
        getA1(): string;
        getCoords(): RunCoords;
        getCount(): number;
        getOrientation(): IRange.Orientation;
        getSheetHeader<S>(): S;
        getSnapshot(
            options?: ICellHeaderRange.CopyOptions,
        ): ICellHeaderRange.ISnapshot;
        getUsedRange(options?: GetRangeOptions): this;
        getVisibleCount(): number;
        isEntireHeaders(): boolean;
        setHidden(hidden?: boolean): this;
        setSize(size?: string | number, options?: SetSizeOptions): this;
        toString(): string;
        updateHeaders(
            values: ICellHeader.Update,
            options?: UpdateHeadersOptions,
        ): this;
    }
    Index

    Properties

    isICellHeaderRange: true

    For runtime type checking.

    Methods

    • Returns the header at a location relative to the range.

      Parameters

      • index: number

      Returns ICellHeader

    • Clear the header format. Specially this will clear the sizes.

      Returns this

    • Similar to forEach but only spans that are different.

      Type Parameters

      • T = any

      Parameters

      • callback: ForEachSpanCallback<T>
      • Optionaloptions: IteratorOptions

      Returns void | T

      • Callbacks can return a 'break' value to stop the visit.
    • Visits visible spans.

      Type Parameters

      • T = any

      Parameters

      • callback: ForEachVisibleSpanCallback<T>
      • Optionaloptions: ForEachVisibleSpanOptions

      Returns void | T

      • If there are no hidden headers this will still be called once.
    • Returns the Coords an A1-style address string (e.g., 'A1' or 'A1:E5').

      Returns string

    • Returns the number of headers included in the range.

      Returns number

    • Returns the SheetHeader.

      Type Parameters

      • S

      Returns S

    • Returns a snapshot of the current range's data and formatting suitable for copying or archiving.

      Parameters

      Returns ICellHeaderRange.ISnapshot

      A ISnapshot object representing the range.

      • Option Merging: If options are also provided during the copy operation, the two will be merged with the copy options taking precedence.
      • getSnapshot can be called multiple times allowing for multiple snapshots.
    • Returns the data ranges for headers that contain information.

      Parameters

      • Optionaloptions: GetRangeOptions

      Returns this

      • This is NOT the last cell that may have data or has been resized.
      • This also has nothing to do with the selection bounds.
    • Returns the number of visible headers in the range.

      Returns number

    • Returns true if the range represents all headers.

      Returns boolean

    • Hides or show the columns for the given range.

      Parameters

      • Optionalhidden: boolean

      Returns this

      false
      
    • Returns the address as a string.

      Returns string