@sheetwrite/coreinterface
Pluggable table import backend. Parses raw .xlsx bytes into the same
ColumnarData shape fromCsv returns, so host ingestion code can stay
format-agnostic.
- Package
@sheetwrite/core- Source
packages/core/src/export.ts#L306
Members 2
name
name: string;fromXlsxTable
fromXlsxTable(data: ArrayBuffer | Uint8Array, options?: XlsxWorkbookOptions): Promise<ColumnarData>(data: ArrayBuffer | Uint8Array, options?: XlsxWorkbookOptions): Promise<ColumnarData>(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.API reference →( data: ArrayBuffer | Uint8Array, 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<ColumnarDatainterface ColumnarData {
rowCount: number;
columns: Record<string, ArrayLike<CellScalar | CellValue>>;
}interface ColumnarData {
rowCount: number;
columns: Record<string, ArrayLike<CellScalar | CellValue>>;
}interface ColumnarData {
rowCount: number;
columns: Record<
string,
ArrayLike<
CellScalar | CellValue
>
>;
}Eager column-oriented values used to initialize a sheet.API reference →>;Declaration
View full TypeScript declaration
export interface XlsxTableImportBackend { name: string; fromXlsxTable(data: ArrayBuffer | Uint8Array, options?: XlsxWorkbookOptions): Promise<ColumnarData>(data: ArrayBuffer | Uint8Array, options?: XlsxWorkbookOptions): Promise<ColumnarData>(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.API reference →( data: ArrayBuffer | Uint8Array, 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<ColumnarDatainterface ColumnarData {
rowCount: number;
columns: Record<string, ArrayLike<CellScalar | CellValue>>;
}interface ColumnarData {
rowCount: number;
columns: Record<string, ArrayLike<CellScalar | CellValue>>;
}interface ColumnarData {
rowCount: number;
columns: Record<
string,
ArrayLike<
CellScalar | CellValue
>
>;
}Eager column-oriented values used to initialize a sheet.API reference →>;}