API REFERENCE

importDataFromXlsx

Parses file bytes into a workbook and returns XlsxImportResult. Read the Grid snapshot from the xlsxImported event.

What does this API do?

Parses file bytes into a workbook and returns XlsxImportResult. Read the Grid snapshot from the xlsxImported event.

Exact input and result types

typescript
importDataFromXlsx(source: ArrayBuffer | Uint8Array, options?: { sheetName?: string; snapshot?: SheetToRowDataOptions }): Promise<XlsxImportResult>
ArgumentsRequiredType
sourceRequiredArrayBuffer | Uint8Array
optionsOptional{ sheetName?: string; snapshot?: SheetToRowDataOptions }

The return type is Promise<XlsxImportResult>.

Usage flow

After registering and initializing the Grid element, call grid.importDataFromXlsx(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

Read related types

Feature explanations and examples