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.
function registerXlsxBackends(): voidfunctionregisterXlsxBackends():voidfunctionregisterXlsxBackends():voidRegister 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 →function fromXlsxTable(data: ArrayBuffer | Uint8Array, options?: XlsxWorkbookOptions): Promise<ColumnarData>functionfromXlsxTable(data:ArrayBuffer|Uint8Array,options?:XlsxWorkbookOptions,):Promise<ColumnarData>functionfromXlsxTable(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 openTable(file: File): Promise<ColumnarData>functionopenTable(file:File):Promise<ColumnarData>functionopenTable(file:File,):Promise<ColumnarData>API reference →interface FileinterfaceFileinterfaceFileThe File interface provides information about files and allows JavaScript in a web page to access their content. MDN Referencefile: Filelet file:Filelet file:FileBlob.arrayBuffer(): Promise<ArrayBuffer> (+1 overload)Blob.arrayBuffer(): Promise<ArrayBuffer> (+1 overload)Blob.arrayBuffer(): Promise<ArrayBuffer> (+1 overload)Returns a promise that resolves to the contents of the blob as an ArrayBufferinterface XlsxWorkbookOptions {
signal?: AbortSignal;
maxCells?: number;
resourceLimits?: Partial<Omit<XlsxResourceLimits, "maxCells">>;
onWarning?: (warning: XlsxWorkbookWarning) => void;
}interfaceXlsxWorkbookOptions {signal?:AbortSignal;maxCells?:number;resourceLimits?:Partial<Omit<XlsxResourceLimits, "maxCells">>;onWarning?: (warning:XlsxWorkbookWarning) =>void;}interfaceXlsxWorkbookOptions {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 →interface ColumnarData {
rowCount: number;
columns: Record<string, ArrayLike<CellScalar | CellValue>>;
}interfaceColumnarData {rowCount:number;columns:Record<string, ArrayLike<CellScalar|CellValue>>;}interfaceColumnarData {rowCount:number;columns:Record<string,ArrayLike<CellScalar|CellValue>>;}Eager column-oriented values used to initialize a sheet.API reference →