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.Exampleimport { registerXlsxBackends } from"@sheetwrite/xlsx";import { fromXlsxWorkbook } from"@sheetwrite/core";registerXlsxBackends();asyncfunctionopen(file:File) {returnfromXlsxWorkbook(await file.arrayBuffer());}See also/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.Exampleimport { registerXlsxBackends } from"@sheetwrite/xlsx";import { fromXlsxTable } from"@sheetwrite/core";registerXlsxBackends();asyncfunctionopenTable(file:File) {returnfromXlsxTable(await file.arrayBuffer());}See alsotoXlsxTableAPI 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 →