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

    Interface IStudioAttributes

    interface IStudioAttributes {
        getEditable: () => SheetEditable | null;
        getFormulaBarElement: () => IFormulaBarElement | null;
        getWorkbook: () => IWorkbook | null;
        getWorkbookElement: () => IWorkbookElement | null;
        isDirty: () => boolean;
        isStudioElement: () => true;
        focus(options?: FocusOptions): void;
        getWorkbookState(): WorkbookLoadState;
        retry(): void;
        save(options?: StudioSaveOptions): Promise<Origin | null>;
        whenReady(): Promise<IWorkbook>;
    }

    Hierarchy (View Summary)

    Index
    getEditable: () => SheetEditable | null

    The shared cell editor, or null if none. The same instance the grid and formula bar drive. Delegates to the workbook element's getEditable().

    getFormulaBarElement: () => IFormulaBarElement | null

    Retrieve the studio's formula bar element, if a formula bar is shown.

    The formula bar is studio chrome (the chromeless IWorkbookElement grid does not have one), so this lives on the studio handle.

    getWorkbook: () => IWorkbook | null

    The studio's live workbook — carrying its origin and display name — or null while loading / on error / before a workbook is set. The same instance pushed via StudioProps.onWorkbookChange, but readable on demand.

    getWorkbookElement: () => IWorkbookElement | null

    Retrieve the chrome-free workbook grid element contained by this studio.

    undefined/null until the workbook has resolved and rendered (e.g. while a loading or error panel is shown).

    isDirty: () => boolean

    The authoritative unsaved-changes state of the live workbook.

    A synchronous, on-demand read (unlike StudioProps.onDirtyChange) — e.g. for a host (a VS Code extension) to re-check dirty immediately after an async save, where a concurrent edit may have re-dirtied the workbook between encode and write.

    isStudioElement: () => true

    For runtime type checking.

    • Move focus into the studio.

      Parameters

      • Optionaloptions: FocusOptions

      Returns void

      A generic focus affordance that delegates to the contained IWorkbookElement's focus() (which focuses the active sheet). Declared here (rather than relying on the inherited HTMLDivElement.focus) so the delegating behavior is part of the studio contract.

      Signature mirrors HTMLElement.focus so IStudioElement can extend both.

    • Re-attempt resolving the current StudioProps.document.

      Returns void

      For programmatic recovery (e.g. a host "reload" action) so an error state isn't terminal — without changing the workbook prop identity. The default error panel does NOT surface this (an invalid file stays invalid, so a retry button would be misleading); a custom UI may call it.

    • Saves the workbook exactly as the studio's own Save does — back to its origin, or asking where when it has none — including the studio's dialog when the write would lose something.

      Parameters

      Returns Promise<Origin | null>

      The origin written, or null when the save was cancelled (a dismissed picker, a declined lossy write).

      For a host that owns the save gesture (a VS Code extension's native Save) and needs the studio's behavior plus the outcome. A failure rejects with the error rather than showing it, so the host can report it its own way. Rejects when the active backing store cannot write.