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

    Function useResolvedWorkbook

    • Resolve a WorkbookInput (instance / promise / read options / empty) into React state, with a cancellation guard so a superseded input can't overwrite a newer one (stale-load race). On a reload it keeps the previously loaded workbook visible until the new one resolves.

      Parameters

      Returns ResolvedWorkbookState

      io / defaultTheme are resolve-time config (read live), NOT reactive triggers — only input (and an explicit UseResolvedWorkbookOptions.reloadKey) re-resolve, so a changing theme/io identity never forces a re-read of the same source.

      A DECLINED open (a dismissed picker, a cancelled password prompt — resolveWorkbookInput resolving null) is not an error: the user asked for nothing to happen, so nothing does. A workbook already on screen stays exactly as it is, and a decline on the very first resolve — where there is nothing to keep — lands on the same blank workbook an empty input would have produced, so the surface comes up usable rather than on an error panel for a file nobody tried to open.