SheetXL - v0.3.20
    Preparing search index...

    Interface ISnapshot<T, J>

    Represents an immutable reference to an ICellRange, capturing its content and metadata. It may include complex objects such as tables, movables, images, listeners, or other items.

    ISnapshot can be provided to `ICellRange.copyFrom``.

    interface ISnapshot<T = any, J = any> {
        isISnapshot: true;
        copyTo(
            destination: ICellRange,
            options?: ICellRange.CopyOptions,
        ): IRange.Coords | Promise<IRange.Coords>;
        getCoords(): Readonly<IRange.Coords>;
        getMarkOptions(): ICellRange.CopyOptions;
        getName(): string;
        getSource(): T;
        toHtml(): string | Promise<string>;
        toImage(): Blob | Promise<Blob>;
        toJSON(): J | Promise<J>;
        toText(): string | Promise<string>;
    }

    Type Parameters

    • T = any
    • J = any
    Index

    Properties

    isISnapshot: true

    For runtime type checking.

    Methods

    • Retrieves the coordinates that bound the current snapshot.

      Returns Readonly<IRange.Coords>

      The IRange.Coords defining the bounds of the snapshot.

    • A user friendly name of a the snapshot item.

      Returns string

    • The source that created the snapshot. This is used by copy to quickly do comparisons.

      Returns T

    • Converts the snapshot to an HTML representation.

      Returns string | Promise<string>

      A string or promise resolving to the HTML representation of the snapshot.

    • Converts the snapshot to an image blob.

      Returns Blob | Promise<Blob>

      A Blob or promise resolving to the image representation of the snapshot.

    • Converts the snapshot to a JSON object.

      Returns J | Promise<J>

      A JSON object or promise resolving to the JSON representation of the snapshot.

    • Converts the snapshot to a plain text representation.

      Returns string | Promise<string>

      A string or promise resolving to the text representation of the snapshot.