Installation
Sheetwrite can sort, filter, hide, group, aggregate, import, and export the active
sheet without rewriting the stored row data. Sorts and filters are display views:
the store keeps a row-order permutation/subset and the renderer reads through it.
Display views
The simple shorthands are still available:
grid . filterBy ( 3 , "Tokyo" ); // keep rows whose column-3 text contains "Tokyo"
For custom UI, use the composable primitives. All active column filters are ANDed
together, hidden rows and collapsed groups are subtracted, and the remaining rows
are sorted by the active multi-key sort.
Method Signature Effect sortBysortBy(col: number, ascending = true): voidReorder displayed rows by one column. sortByMultisortByMulti(keys: readonly SortKey[]): voidStable multi-key sort; first key is primary. filterByfilterBy(col: number, needle: string): voidShorthand for a case-insensitive contains column filter. setColumnFiltersetColumnFilter(col: number, filter: ColumnFilter | null): voidSet or clear one column filter. getColumnFiltersgetColumnFilters(): ReadonlyMap<number, ColumnFilter>Current active column filters. distinctValuesdistinctValues(col: number, limit = 1000): CellScalar[]First-seen distinct resolved values for a column. hideRows / showRowshideRows(rows) / showRows(rows?)Hide/show data rows independent of sort/filter state. hiddenRowshiddenRows(): readonly number[]Currently hidden data rows. groupRows / ungroupRowsgroupRows(start, end) / ungroupRows(start, end)Create/remove an inclusive data-row group. setGroupCollapsedsetGroupCollapsed(start, collapsed): voidCollapse or expand the group starting at start. rowGroupsrowGroups(): readonly RowGroup[]Current row-group definitions. clearViewclearView(): voidClears sort/filter state. Hidden rows and row groups are preserved.
clearView() deliberately does not unhide rows or expand row groups. This
matches spreadsheet behavior: clearing a filter removes the query, but explicit
hidden rows and collapsed groups remain a separate visibility state. Use
showRows() and setGroupCollapsed(start, false) to reverse those states.
Because a view reorders or hides rows, two features that depend on a stable
row-to-cell mapping are disabled while a view is active:
Merged cells are not drawn (the layout reports no merges under a view).
Drag-to-fill is unavailable (the fill handle is hidden).
Call clearView() to remove sort/filter state; also show hidden rows / expand
row groups if you need the full natural data order.
Aggregate
aggregate computes a column reduction over the active sheet's data and returns a
number:
Frozen panes and zoom
Frozen panes and zoom are view geometry, not data mutations:
setFrozen(rows, cols?) pins leading view rows and columns while the body
scrolls. setZoom(z) clamps to 0.5-2 and scales painted row/column geometry
and fonts; workbook widths/heights remain in base units.
Export
The grid can download the active sheet directly. CSV is synchronous; XLSX is
async because the optional backend produces bytes asynchronously. Install and
register @sheetwrite/xlsx before enabling a framework toolbar export action
or calling grid.exportXlsx:
npm install @sheetwrite/xlsx
import "@sheetwrite/xlsx/register" ;
grid.exportXlsx(...) rejects when registration or encoding fails, preserving
the backend error. Built-in toolbar and context-menu actions show an alert and
emit one export-error event with { format: "csv" | "xlsx", error }.
grid.actions.exportXlsx() returns a promise that resolves after the command
finishes, including when the export fails. Built-in buttons ignore a repeated
start while the same command is pending and show a busy state.
CSV is written UTF-8 with a BOM and CRLF line endings, and string values are
injection-hardened — a value starting with =, +, -, @, tab, or CR is
prefixed with a single quote so it cannot become an executable formula when
reopened in a spreadsheet app.
Clipboard formulas and references retain their rich behavior only for a
copy/cut pasted back through the same live Sheetwrite grid controller. Rich
payloads from another controller or application, including spreadsheet HTML,
paste as injection-neutralized text; pasteValues uses resolved literals.
Standalone import/export functions
Sheetwrite exposes two intentionally different XLSX contracts:
Table interchange : toXlsxTable / fromXlsxTable. This is the active-sheet,
first-row-header API used by grid.exportXlsx.
Workbook round-trip : toXlsxWorkbook / fromXlsxWorkbook. This consumes
and produces the same WorkbookSnapshot used by persistence, without adding
a header row.
Register the optional XLSX package once before using either contract:
} from "@sheetwrite/core" ;
import "@sheetwrite/xlsx/register" ;
const csv = toCsv ( sheet , store ); // string (BOM + CRLF, injection-hardened) "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ,
Function Signature fromCsvfromCsv(text: string, columns: readonly Column[]): ColumnarDatafromXlsxTable(data: ArrayBuffer | Uint8Array, options?: XlsxWorkbookOptions) => Promise<ColumnarData>fromXlsxWorkbook(data: ArrayBuffer | Uint8Array, options?: XlsxWorkbookOptions) => Promise<WorkbookSnapshot>toCsvtoCsv(sheet: Sheet, store: Store): stringtoTsvtoTsv(range: Range, store: Store): stringtoXlsxTable(workbook: Workbook, store: Store, options?: XlsxWorkbookOptions) => Promise<Uint8Array>toXlsxWorkbook(snapshot: WorkbookSnapshot, options?: XlsxWorkbookOptions) => Promise<Uint8Array>downloadBytesdownloadBytes(bytes: Uint8Array | string, filename: string, mime: string): void
XlsxWorkbookOptions is the shared resource contract for every table and
workbook path. maxCells bounds logical accepted cells and defaults to
1_000_000; resourceLimits overrides the remaining input, archive, XML,
dimension, and output budgets, which are checked before decompression and
allocation and reject with a typed XlsxResourceError. signal is checked
between bounded codec stages, and structured warnings surface through
onWarning. Both directions materialize the complete file representation in
memory; there is no streaming mode.
XLSX compatibility
Feature Table API Workbook API Multiple worksheets and order Active sheet only Preserved First row Synthesized column headers Ordinary row; no header synthesis Formula source, including cross-sheet formulas Exports resolved scalars Preserved; workbook requests full recalculation on open Cell styles, borders, number/date formats Preserved on active-sheet export Preserved Merges, column widths, row heights Preserved on active-sheet export Preserved Frozen panes and active worksheet Not round-tripped Preserved Named ranges Not represented Preserved Sheetwrite conditional formats and row groups Not represented Preserved in Sheetwrite metadata; warning reports that no Excel rule/outline is emitted Boolean literals Imported by the table reader Preserved as native booleans Rich text and hyperlinks Reader-dependent flattening Display text preserved with a structured warning Sheetwrite validation rules Not represented Preserved in Sheetwrite metadata; supported list/numeric/date/text-length rules also emit native Excel validation Protected ranges Not represented Preserved in Sheetwrite metadata; no Excel sheet-protection claim is made Cell notes Not represented Preserved in Sheetwrite metadata and emitted as native Excel notes External Excel validation, protection, notes, images, tables, auto-filters, conditional formatting, and VBA Not represented Features without Sheetwrite metadata are dropped with a structured unsupported-feature warning when detected
Workbook formulas are imported as formula source, not as cached results.
Hydrating the returned snapshot with SheetwriteStore.fromSnapshot recompiles
them into the WASM formula engine. No raw formula handles enter the serialized
snapshot.
XLSX backends
XLSX uses pluggable backends. Calling a table or workbook API without its
backend throws a configuration error that names both remedies: install
@sheetwrite/xlsx, then import @sheetwrite/xlsx/register before calling the
function. The ordinary core entry never resolves the optional codec, so normal
grid bundles carry no spreadsheet-file code.
@sheetwrite/xlsx is the only concrete implementation package. Its root entry
is side-effect free and exports registerXlsxBackends() plus the three named
backend instances for explicit registration or wrapping. The ./register
entry performs idempotent registration:
} from "@sheetwrite/xlsx" ;
} from "@sheetwrite/core" ;
// Or compose individual backends explicitly.
The backends share Sheetwrite's internal bounded OOXML codec, which owns OPC
part resolution, XML tokenization, styles, and worksheet mapping over one
audited compression primitive (fflate). It preserves formula source,
worksheets, styles, merges, dimensions, frozen views, and named ranges, and it
enforces the shared resource limits before decompression. The host can replace
any role by implementing XlsxWorkbookBackend or the table backend contracts.
See also
Interaction for clipboard TSV and the toolbar sort control.
Concepts for row/column DocumentOp transactions.
const grid: Grid const grid : Grid const grid : Grid The imperative core grid this controller owns. API reference → Grid.sortBy(col: number, ascending?: boolean): void Grid. sortBy (col: number, ascending ?: boolean): void Grid. sortBy (col: number, ascending ?: boolean): void Sort the displayed rows by a column (does not mutate stored data). @example import type { Grid } from "@sheetwrite/core"; function showLargestFirst(grid: Grid) { grid.sortBy(1, false); }@see Grid.clearViewAPI reference → Grid.filterBy(col: number, needle: string): void Grid. filterBy (col: number, needle: string): void Grid. filterBy (col: number, needle: string): void Filter the displayed rows to those whose column text contains needle. @example import type { Grid } from "@sheetwrite/core"; function showOpenRows(grid: Grid) { grid.filterBy(0, "Open"); }@see Grid.clearViewAPI reference → Grid.clearView(): void Grid. clearView (): void Grid. clearView (): void Clear any active sort/filter view. API reference → Grid.sortByMulti(keys: readonly SortKey[]): void Grid. sortByMulti (keys: readonly SortKey[]): void Grid. sortByMulti (keys: readonly SortKey[]): void Multi-key sort of the displayed rows (first key primary; stable). API reference → SortKey.col: number interface SortKey {
col : number ;
} interface SortKey {
col : number ;
} API reference → SortKey.ascending: boolean interface SortKey {
ascending : boolean ;
} interface SortKey {
ascending : boolean ;
} API reference → Grid.setColumnFilter(col: number, filter: ColumnFilter | null): void Grid. setColumnFilter (col: number, filter: ColumnFilter | null ): void Grid. setColumnFilter (col: number, filter: ColumnFilter | null ): void Set or clear (null) one column's filter. All column filters AND together and compose with the active sort and hidden rows. API reference → text: string let text : string let text : string Formula source when the cell is a formula, else the literal display text. API reference → values: readonly CellScalar[] let values : readonly CellScalar [] let values : readonly CellScalar [] row-major resolved values, length (end-start) * cols.length API reference → op: "gt" | "gte" | "lt" | "lte" | "eq" | "neq" let op : "gt" | "gte" | "lt" | "lte" | "eq" | "neq" let op :
| "gt"
| "gte"
| "lt"
| "lte"
| "eq"
| "neq" value: number let value : number let value : number const cities: CellScalar[] const cities : CellScalar [] const cities : CellScalar [] API reference → Grid.distinctValues(col: number, limit?: number): CellScalar[] Grid. distinctValues (col: number, limit ?: number): CellScalar[] Grid. distinctValues (col: number, limit ?: number): CellScalar[] Distinct resolved values of a column in first-seen order. Defaults to 1,000 values for bounded filter menus; pass 0 to request an uncapped scan. API reference → Grid.hideRows(rows: readonly number[]): void Grid. hideRows (rows: readonly number[]): void Grid. hideRows (rows: readonly number[]): void Hide the given data rows (composes with filters/sort). API reference → Grid.groupRows(start: number, end: number): void Grid. groupRows (start: number, end: number): void Grid. groupRows (start: number, end: number): void Define a collapsible row group over a data-row range (end-inclusive). API reference → Grid.setGroupCollapsed(start: number, collapsed: boolean): void Grid. setGroupCollapsed (start: number, collapsed: boolean): void Grid. setGroupCollapsed (start: number, collapsed: boolean): void Collapse/expand a row group; collapsing hides its rows. API reference → type Aggregate = (col: number, op: AggregateOp) => number type Aggregate = ( col : number , op : AggregateOp ) => number ; type Aggregate = (
col : number ,
op : AggregateOp ,
) => number ; API reference → interface Grid interface Grid interface Grid Imperative grid handle for document commands, events, rendering, and teardown. @example import type { Grid } from "@sheetwrite/core"; function updateTotal(grid: Grid) { const sheet = grid.getActiveSheet(); const result = grid.applyTransaction({ patches: [{ op: "set", addr: { sheet, row: 0, col: 0 }, value: { kind: "literal", value: 42 } }], }); if (result.status === "applied") grid.scrollToCell({ sheet, row: 0, col: 0 }); return grid.aggregate(0, "sum"); }@see createGrid *@see Grid.applyTransactionAPI reference → const total: number const total : number const total : number Grid.aggregate(col: number, op: AggregateOp): number Grid. aggregate (col: number, op: AggregateOp): number Grid. aggregate (col: number, op: AggregateOp): number Column aggregate over the active sheet's data. @example import type { Grid } from "@sheetwrite/core"; function total(grid: Grid) { return grid.aggregate(1, "sum"); }@see SheetwriteStore.aggregateAPI reference → const rows: number const rows : number const rows : number end-exclusive row range API reference → Grid.setFrozen(rows: number, cols?: number): void Grid. setFrozen (rows: number, cols ?: number): void Grid. setFrozen (rows: number, cols ?: number): void Pin the first rows view rows and cols columns; they stay visible while the body scrolls (0 = unfreeze that axis). Persisted on the active sheet. API reference → Grid.setZoom(zoom: number): void Grid. setZoom (zoom: number): void Grid. setZoom (zoom: number): void Content zoom factor (0.5–2): scales row/column geometry and fonts. API reference → var console: Console var console : Console var console : Console Console.log(...data: any[]): void (+1 overload) Console. log ( ... data: any[]): void ( + 1 overload) Console. log ( ... data: any[]): void ( + 1 overload) The console.log() static method outputs a message to the console. MDN Reference Grid.getZoom(): number Grid. getZoom (): number Grid. getZoom (): number API reference → Grid.exportCsv(filename: string): void Grid. exportCsv (filename: string): void Grid. exportCsv (filename: string): void Download the active sheet as CSV. @example import type { Grid } from "@sheetwrite/core"; function downloadCsv(grid: Grid) { grid.exportCsv("sales.csv"); }API reference → Grid.exportXlsx(filename: string): Promise<void> Grid. exportXlsx (filename: string): Promise <void> Grid. exportXlsx (filename: string): Promise <void> Download the active sheet through the registered XLSX backend. @example import type { Grid } from "@sheetwrite/core"; import { registerXlsxBackends } from "@sheetwrite/xlsx"; async function downloadXlsx(grid: Grid) { await registerXlsxBackends(); await grid.exportXlsx("sales.xlsx"); }@see toXlsxWorkbookAPI reference → Grid.on<"export-error">(evt: "export-error", fn: (e: {
format: "csv" | "xlsx";
error: SheetwriteError;
}) => void): () => void Grid. on < "export-error" >(evt: "export-error" , fn: ( e : {
format : "csv" | "xlsx" ;
error : SheetwriteError ;
}) => void ): () => void Grid. on < "export-error" >(evt: "export-error" , fn: ( e : {
format : "csv" | "xlsx" ;
error : SheetwriteError ;
}) => void ): () => void format: "csv" | "xlsx" let format : "csv" | "xlsx" let format :
"csv" | "xlsx" Column input format, for parseCellInput. API reference → error: SheetwriteError let error : SheetwriteError let error : SheetwriteError API reference → Console.error(...data: any[]): void (+1 overload) Console. error ( ... data: any[]): void ( + 1 overload) Console. error ( ... data: any[]): void ( + 1 overload) Log to stderr in your terminal Appears in red @param data something to displayfunction downloadBytes(bytes: Uint8Array | string, filename: string, mime: string): void function downloadBytes (
bytes : Uint8Array | string ,
filename : string ,
mime : string ,
) : void function downloadBytes (
bytes : Uint8Array | string ,
filename : string ,
mime : string ,
) : void Trigger a browser download from in-memory bytes. The temporary anchor is removed and its object URL is scheduled for revocation even when DOM append or click throws. API reference → function fromCsv(text: string, columns: readonly Column[], options?: DelimitedTextOptions): ColumnarData function fromCsv (
text : string ,
columns : readonly Column [],
options ?: DelimitedTextOptions ,
) : ColumnarData function fromCsv (
text : string ,
columns : readonly Column [],
options ?: DelimitedTextOptions ,
) : ColumnarData Parse CSV into ColumnarData. The first record is consumed as a positional header. Input fields project onto declared visible columns; hidden declared columns are initialized to null, matching the visible-column CSV export. Extra fields are ignored and missing fields become null. The returned columnar table is fully materialized in memory. API reference → function fromXlsxTable(data: ArrayBuffer | Uint8Array, options?: XlsxWorkbookOptions): Promise<ColumnarData> function fromXlsxTable (
data : ArrayBuffer | Uint8Array ,
options ?: XlsxWorkbookOptions ,
) : Promise < ColumnarData > function fromXlsxTable (
data : ArrayBuffer | Uint8Array ,
options ?: XlsxWorkbookOptions ,
) : Promise < ColumnarData > Parse the first sheet of .xlsx bytes into ColumnarData. The first parsed row is treated as the header and its cell text becomes each column's key. Numbers stay numbers, date cells use the date-serial convention, strings are verbatim, and empty cells become null. @example import { registerXlsxBackends } from "@sheetwrite/xlsx"; import { fromXlsxTable } from "@sheetwrite/core"; registerXlsxBackends(); async function openTable(file: File) { return fromXlsxTable(await file.arrayBuffer()); }@see toXlsxTableAPI reference → function fromXlsxWorkbook(data: ArrayBuffer | Uint8Array, options?: XlsxWorkbookOptions): Promise<WorkbookSnapshot> function fromXlsxWorkbook (
data : ArrayBuffer | Uint8Array ,
options ?: XlsxWorkbookOptions ,
) : Promise < WorkbookSnapshot > function fromXlsxWorkbook (
data : ArrayBuffer | Uint8Array ,
options ?: XlsxWorkbookOptions ,
) : Promise < WorkbookSnapshot > Formula-preserving, multi-sheet workbook import through the optional XLSX backend. @example import { registerXlsxBackends } from "@sheetwrite/xlsx"; import { fromXlsxWorkbook, createGridFromSnapshot, initSheetwrite } from "@sheetwrite/core"; registerXlsxBackends(); async function openWorkbook(host: HTMLElement, file: File) { await initSheetwrite(); const snapshot = await fromXlsxWorkbook(await file.arrayBuffer()); return createGridFromSnapshot(host, snapshot); }@see toXlsxWorkbookAPI reference → class SheetwriteStore class SheetwriteStore class SheetwriteStore Stable public facade and the sole transaction, epoch, policy, and event barrier. @example import { initSheetwrite, SheetwriteStore, type Workbook } from "@sheetwrite/core"; async function total(workbook: Workbook) { await initSheetwrite(); const store = new SheetwriteStore(workbook); try { return store.aggregate(workbook.activeSheet, 0, "sum"); } finally { store.dispose(); } }@see Store.aggregate *@see createGridAPI reference → function toCsv(sheet: Sheet, store: Store, options?: DelimitedTextOptions): string function toCsv (
sheet : Sheet ,
store : Store ,
options ?: DelimitedTextOptions ,
) : string function toCsv (
sheet : Sheet ,
store : Store ,
options ?: DelimitedTextOptions ,
) : string Export the current visible CSV view (UTF-8 BOM, CRLF): visible columns and view-ordered rows surviving sort, filter, hidden-row, and group state. String values beginning with = + - @ \t \r are prefixed with '. The synchronous API returns one in-memory string, but fetches at most maxWriterWindowRows view rows from the store per read. @throws {@link IncompleteDataError} before serialization when a paged sheet is incomplete.@throws {@link DelimitedTextResourceError} when a configured resource ceiling is exceeded.API reference → function toTsv(range: Range, store: Store, options?: DelimitedTextOptions): string function toTsv (
range : Range ,
store : Store ,
options ?: DelimitedTextOptions ,
) : string function toTsv (
range : Range ,
store : Store ,
options ?: DelimitedTextOptions ,
) : string Export a canonical data-space range as clipboard-compatible TSV (CRLF, no BOM). Reversed corners are normalized; active sort and filter views do not remap the supplied row coordinates. Values are injection-hardened. The synchronous API returns one in-memory string and fetches at most maxWriterWindowRows canonical rows per packed store read. @throws {@link IncompleteDataError} before serialization when a paged sheet is incomplete.@throws {@link DelimitedTextResourceError} when a configured resource ceiling is exceeded.API reference → function toXlsxTable(workbook: Workbook, store: Store, options?: XlsxWorkbookOptions): Promise<Uint8Array> function toXlsxTable (
workbook : Workbook ,
store : Store ,
options ?: XlsxWorkbookOptions ,
) : Promise < Uint8Array > function toXlsxTable (
workbook : Workbook ,
store : Store ,
options ?: XlsxWorkbookOptions ,
) : Promise < Uint8Array > Exports a table model through the registered optional XLSX backend. @example import { registerXlsxBackends } from "@sheetwrite/xlsx"; import { toXlsxTable, downloadBytes, type Workbook, type Store } from "@sheetwrite/core"; registerXlsxBackends(); async function download(workbook: Workbook, store: Store) { const bytes = await toXlsxTable(workbook, store); downloadBytes(bytes, "table.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); }@see fromXlsxTableAPI reference → function toXlsxWorkbook(input: WorkbookSnapshot | Pick<Grid, "exportSnapshot">, options?: XlsxWorkbookOptions): Promise<Uint8Array> function toXlsxWorkbook (
input : WorkbookSnapshot | Pick < Grid , "exportSnapshot" >,
options ?: XlsxWorkbookOptions ,
) : Promise < Uint8Array > function toXlsxWorkbook (
input :
| WorkbookSnapshot
| Pick <
Grid ,
"exportSnapshot"
>,
options ?: XlsxWorkbookOptions ,
) : Promise < Uint8Array > Formula-preserving, multi-sheet workbook export through the optional XLSX backend. @example import { registerXlsxBackends } from "@sheetwrite/xlsx"; import { toXlsxWorkbook, downloadBytes, type Grid } from "@sheetwrite/core"; registerXlsxBackends(); async function download(grid: Grid) { const bytes = await toXlsxWorkbook(grid); downloadBytes(bytes, "workbook.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); }@see fromXlsxWorkbookAPI reference → const dataFromCsv: ColumnarData const dataFromCsv : ColumnarData const dataFromCsv : ColumnarData API reference → const csvText: string const csvText : string const csvText : string const columns: readonly SimpleColumn<Record<string, CellScalar>>[] const columns : readonly SimpleColumn <
Record < string , CellScalar >
>[] const columns : readonly SimpleColumn <
Record < string , CellScalar >
>[] Exact column runs represented by every returned row. API reference → const tableBytes: Uint8Array<ArrayBufferLike> const tableBytes : Uint8Array < ArrayBufferLike > const tableBytes : Uint8Array < ArrayBufferLike > const workbook: Workbook const workbook : Workbook const workbook : Workbook Live workbook schema adopted by the store and updated by document operations. API reference → const store: Store const store : Store const store : Store API reference → const dataFromTable: ColumnarData const dataFromTable : ColumnarData const dataFromTable : ColumnarData API reference → const workbookBytes: Uint8Array<ArrayBufferLike> const workbookBytes : Uint8Array < ArrayBufferLike > const workbookBytes : Uint8Array < ArrayBufferLike > Store.exportSnapshot?(): WorkbookSnapshot Store.exportSnapshot ? () : WorkbookSnapshot Store.exportSnapshot ? () : WorkbookSnapshot Deterministic, JSON-safe authoritative runtime document. API reference → XlsxWorkbookOptions.maxCells?: number | undefined interface XlsxWorkbookOptions {
maxCells ?: number | undefined ;
} interface XlsxWorkbookOptions {
maxCells ?: number | undefined ;
} Cells accounted by the active conversion path; defaults to 1,000,000. API reference → XlsxWorkbookOptions.signal?: AbortSignal | undefined interface XlsxWorkbookOptions {
signal ?: AbortSignal | undefined ;
} interface XlsxWorkbookOptions {
signal ?:
AbortSignal | undefined ;
} Abort before or between bounded codec operations. API reference → const abortController: AbortController const abortController : AbortController const abortController : AbortController AbortController.signal: AbortSignal interface AbortController {
signal : AbortSignal ;
} interface AbortController {
signal : AbortSignal ;
} The signal read-only property of the AbortController interface returns an AbortSignal object instance, which can be used to communicate with/abort an asynchronous operation as desired. MDN Reference API reference → XlsxWorkbookOptions.onWarning?: ((warning: XlsxWorkbookWarning) => void) | undefined interface XlsxWorkbookOptions {
onWarning ?: (( warning : XlsxWorkbookWarning ) => void ) | undefined ;
} interface XlsxWorkbookOptions {
onWarning ?:
| ((
warning : XlsxWorkbookWarning ,
) => void )
| undefined ;
} warning: XlsxWorkbookWarning let warning : XlsxWorkbookWarning let warning : XlsxWorkbookWarning API reference → Console.warn(...data: any[]): void (+1 overload) Console. warn ( ... data: any[]): void ( + 1 overload) Console. warn ( ... data: any[]): void ( + 1 overload) The console.warn() static method outputs a warning message to the console at the 'warning' log level. MDN Reference XlsxWorkbookWarning.code: "boolean-literal" | "rich-text" | "hyperlink" | "unsupported-cell-value" | "unsupported-feature" | "external-relationship" | "external-formula" | "format-loss" | "validation-loss" | "invalid-metadata" interface XlsxWorkbookWarning {
code :
| "boolean-literal"
| "rich-text"
| "hyperlink"
| "unsupported-cell-value"
| "unsupported-feature"
| "external-relationship"
| "external-formula"
| "format-loss"
| "validation-loss"
| "invalid-metadata" ;
} interface XlsxWorkbookWarning {
code :
| "boolean-literal"
| "rich-text"
| "hyperlink"
| "unsupported-cell-value"
| "unsupported-feature"
| "external-relationship"
| "external-formula"
| "format-loss"
| "validation-loss"
| "invalid-metadata" ;
} API reference → XlsxWorkbookWarning.message: string interface XlsxWorkbookWarning {
message : string ;
} interface XlsxWorkbookWarning {
message : string ;
} API reference → const importedSnapshot: WorkbookSnapshot const importedSnapshot : WorkbookSnapshot const importedSnapshot : WorkbookSnapshot API reference → const importedStore: SheetwriteStore const importedStore : SheetwriteStore const importedStore : SheetwriteStore API reference → SheetwriteStore.fromSnapshot(input: unknown, options?: SheetwriteStoreOptions): SheetwriteStore SheetwriteStore. fromSnapshot (input: unknown, options ?: SheetwriteStoreOptions): SheetwriteStore SheetwriteStore. fromSnapshot (input: unknown, options ?: SheetwriteStoreOptions): SheetwriteStore const csv: string const csv : string const csv : string const sheet: string const sheet : string const sheet : string Sheet identity used by the simple data-first adapter. Defaults to sheet1. API reference → const tsv: string const tsv : string const tsv : string const range: {
start: CellAddress;
end: CellAddress;
} const range : {
start : CellAddress ;
end : CellAddress ;
} const range : {
start : CellAddress ;
end : CellAddress ;
} Inclusive table rectangle on one stable sheet ID. API reference → function registerXlsxBackends(): void function registerXlsxBackends () : void function registerXlsxBackends () : void Register all concrete XLSX backends with the backend-neutral core contracts. @example import { registerXlsxBackends } from "@sheetwrite/xlsx"; import { fromXlsxWorkbook } from "@sheetwrite/core"; registerXlsxBackends(); async function open(file: File) { return fromXlsxWorkbook(await file.arrayBuffer()); }@see /docs/guides/xlsx-export/API reference → const sheetwriteTableExportBackend: XlsxTableExportBackend const sheetwriteTableExportBackend : XlsxTableExportBackend const sheetwriteTableExportBackend : XlsxTableExportBackend Default bounded first-sheet table export backend. API reference → const sheetwriteTableImportBackend: XlsxTableImportBackend const sheetwriteTableImportBackend : XlsxTableImportBackend const sheetwriteTableImportBackend : XlsxTableImportBackend Default bounded first-sheet table import backend. API reference → const sheetwriteWorkbookBackend: XlsxWorkbookBackend const sheetwriteWorkbookBackend : XlsxWorkbookBackend const sheetwriteWorkbookBackend : XlsxWorkbookBackend Deterministic optional OOXML workbook backend implemented by Sheetwrite. API reference → function setXlsxTableExportBackend(next: XlsxTableExportBackend): void function setXlsxTableExportBackend (
next : XlsxTableExportBackend ,
) : void function setXlsxTableExportBackend (
next : XlsxTableExportBackend ,
) : void Registers the optional table XLSX export implementation used by core. API reference → function setXlsxTableImportBackend(next: XlsxTableImportBackend): void function setXlsxTableImportBackend (
next : XlsxTableImportBackend ,
) : void function setXlsxTableImportBackend (
next : XlsxTableImportBackend ,
) : void Registers the optional table XLSX import implementation used by core. API reference → function setXlsxWorkbookBackend(next: XlsxWorkbookBackend): void function setXlsxWorkbookBackend (
next : XlsxWorkbookBackend ,
) : void function setXlsxWorkbookBackend (
next : XlsxWorkbookBackend ,
) : void Registers the optional workbook XLSX implementation used by core. API reference → interface XlsxTableExportBackend interface XlsxTableExportBackend interface XlsxTableExportBackend Pluggable first-row-header, first-sheet table export backend. API reference → interface XlsxTableImportBackend interface XlsxTableImportBackend interface XlsxTableImportBackend Pluggable table import backend. Parses raw .xlsx bytes into the same ColumnarData shape fromCsv returns, so host ingestion code can stay format-agnostic. API reference → interface XlsxWorkbookBackend interface XlsxWorkbookBackend interface XlsxWorkbookBackend Optional backend contract for complete workbook XLSX interchange. API reference →