Mount a complete spreadsheet shell into host: toolbar row, formula row
(name box + formula bar), the grid, and a bottom row with sheet tabs and a
selection status. The host must have a real size; the shell fills it. Returns
the shell handle; destroy tears down every piece, the grid, and the shell
DOM, and is safe to call twice.
Package @sheetwrite/core/shell
Source packages/core/src/shell/spreadsheet-shell.ts#L60
Declaration
function createSpreadsheetShell (
options : SpreadsheetShellOptions interface SpreadsheetShellOptions {
grid: GridOptions;
toolbar?: readonly ToolbarItem[];
onChange?: (event: ChangeEvent) => void;
onSelectionChange?: (selection: Selection | null) => void;
onReady?: (grid: Grid) => void;
} interface SpreadsheetShellOptions {
grid : GridOptions ;
toolbar ?: readonly ToolbarItem [];
onChange ?: ( event : ChangeEvent ) => void ;
onSelectionChange ?: ( selection : Selection | null ) => void ;
onReady ?: ( grid : Grid ) => void ;
} interface SpreadsheetShellOptions {
grid : GridOptions ;
toolbar ?: readonly ToolbarItem [];
onChange ?: (
event : ChangeEvent ,
) => void ;
onSelectionChange ?: (
selection : Selection | null ,
) => void ;
onReady ?: ( grid : Grid ) => void ;
} Host elements and feature options used to create a spreadsheet shell. API reference → , ) : SpreadsheetShell interface SpreadsheetShell {
readonly grid: Grid;
readonly element: HTMLElement;
setTheme(theme: Partial<Theme>): void;
setReadOnly(readOnly: boolean): void;
setGridConfig(config: GridConfig | undefined): void;
setActiveSheet(id: SheetId): void;
destroy(): void;
} interface SpreadsheetShell {
readonly grid : Grid ;
readonly element : HTMLElement ;
setTheme ( theme : Partial < Theme >) : void ;
setReadOnly ( readOnly : boolean ) : void ;
setGridConfig ( config : GridConfig | undefined ) : void ;
setActiveSheet ( id : SheetId ) : void ;
destroy () : void ;
} interface SpreadsheetShell {
readonly grid : Grid ;
readonly element : HTMLElement ;
setTheme (
theme : Partial < Theme >,
) : void ;
setReadOnly (
readOnly : boolean ,
) : void ;
setGridConfig (
config :
GridConfig | undefined ,
) : void ;
setActiveSheet (
id : SheetId ,
) : void ;
destroy () : void ;
} Disposable controller for the framework-neutral spreadsheet shell. API reference →