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

    Interface ReadRequest

    The request passed to IWorkbookIO.IBackingStore.read.

    A store's job is source acquisition — turn source (or, when it is null, a location it resolves itself, e.g. an open picker) into bytes — and then call ReadRequest.decode, which handles format detection and workbook construction. This mirrors how WriteRequest.encode keeps format concerns out of the store.

    interface ReadRequest {
        options: Omit<ReadOptions, "source">;
        source:
            | MaybePromise<IOSource>
            | (() => MaybePromise<IOSource>)
            | null
            | undefined;
        decode(bytes: ArrayBufferLike, info?: ReadInfo): Promise<IWorkbook | null>;
    }
    Index
    options: Omit<ReadOptions, "source">

    The read options (format hint, name, createWorkbookOptions, progress, etc.).

    source:
        | MaybePromise<IOSource>
        | (() => MaybePromise<IOSource>)
        | null
        | undefined

    The source to read from, or null for the store to resolve a location itself.

    • Decodes acquired bytes into a workbook: resolves the format, unwraps any encryption envelope (prompting via ReadOptions.onPassword), mints the origin handle (which the workbook carries), runs the handler, and reports progress. The store supplies what it knows about the source via ReadInfo.

      Parameters

      • bytes: ArrayBufferLike
      • Optionalinfo: ReadInfo

      Returns Promise<IWorkbook | null>

      The decoded workbook, or null if the caller cancelled a password prompt — a store should return that null onward, the same as it would for a dismissed picker.