@sheetwrite/corefunction
Formula-preserving, multi-sheet workbook export through the optional XLSX backend.
- Package
@sheetwrite/core- Source
packages/core/src/export.ts#L391
Declaration
function toXlsxWorkbook( input: WorkbookSnapshotinterface WorkbookSnapshot {
schemaVersion: 1;
documentId?: string;
version?: number;
workbook: {
activeSheet: SheetId;
namedRanges?: NamedRangeSnapshot[];
};
sheets: SheetSnapshot[];
}interface WorkbookSnapshot {
schemaVersion: 1;
documentId?: string;
version?: number;
workbook: {
activeSheet: SheetId;
namedRanges?: NamedRangeSnapshot[];
};
sheets: SheetSnapshot[];
}interface WorkbookSnapshot {
schemaVersion: 1;
documentId?: string;
version?: number;
workbook: {
activeSheet: SheetId;
namedRanges?: NamedRangeSnapshot[];
};
sheets: SheetSnapshot[];
}Schema-versioned serializable workbook document.API reference → | Pick<Gridinterface Grid {
readonly store: Store;
readonly actions: GridActions;
setActiveSheet(id: SheetId): void;
scrollToCell(addr: CellAddress): void;
getCellAtPoint(
clientX: number,
clientY: number,
): CellAddress | null;
getActiveSheet(): SheetId;
getCellInput(row: number, col: number): CellInputSnapshot | null;
getSelection(): Selection | null;
setSelection(sel: Selection | null): void;
setTheme(theme: Partial<Theme>): void;
replaceTheme(theme: Partial<Theme> | undefined): void;
// … 106 more lines — see the API reference
}interface Grid {
readonly store: Store;
readonly actions: GridActions;
setActiveSheet(id: SheetId): void;
scrollToCell(addr: CellAddress): void;
getCellAtPoint(
clientX: number,
clientY: number,
): CellAddress | null;
getActiveSheet(): SheetId;
getCellInput(row: number, col: number): CellInputSnapshot | null;
getSelection(): Selection | null;
setSelection(sel: Selection | null): void;
setTheme(theme: Partial<Theme>): void;
replaceTheme(theme: Partial<Theme> | undefined): void;
// … 106 more lines — see the API reference
}interface Grid {
readonly store: Store;
readonly actions: GridActions;
setActiveSheet(
id: SheetId,
): void;
scrollToCell(
addr: CellAddress,
): void;
getCellAtPoint(
clientX: number,
clientY: number,
): CellAddress | null;
getActiveSheet(): SheetId;
getCellInput(
row: number,
col: number,
): CellInputSnapshot | null;
getSelection(): Selection | null;
// … 229 more lines — see the API reference
}Imperative grid handle for document commands, events, rendering, and teardown.API reference →, "exportSnapshot">, options?: XlsxWorkbookOptionsinterface XlsxWorkbookOptions {
signal?: AbortSignal;
maxCells?: number;
resourceLimits?: Partial<Omit<XlsxResourceLimits, "maxCells">>;
onWarning?: (warning: XlsxWorkbookWarning) => void;
}interface XlsxWorkbookOptions {
signal?: AbortSignal;
maxCells?: number;
resourceLimits?: Partial<Omit<XlsxResourceLimits, "maxCells">>;
onWarning?: (warning: XlsxWorkbookWarning) => void;
}interface XlsxWorkbookOptions {
signal?: AbortSignal;
maxCells?: number;
resourceLimits?: Partial<
Omit<
XlsxResourceLimits,
"maxCells"
>
>;
onWarning?: (
warning: XlsxWorkbookWarning,
) => void;
}Shared options passed to every registered table and workbook XLSX backend.API reference →,): Promise<Uint8Array>