Excel import
Read workbook sheets and convert them into Grid data.
Provide a file picker and read the selected file as an ArrayBuffer. For multiple sheets, also let users choose the sheet to import.
View code
Sample data included in the code · 6 rows
Usage guide
#Read a specific Excel sheet, review its content in your app, then apply it to the table.
Integration steps
- Choose a file and sheet
Provide a file picker and read the selected file as an ArrayBuffer. For multiple sheets, also let users choose the sheet to import.
- Parse the file
Pass file bytes to importDataFromXlsx. Inspect returned results and converted columns/rows in xlsxImported.
- Review and apply
Connect the converted snapshot's columnDefs and rowData to the Grid. Review column names and date/number interpretation.
Convert an Excel sheet into columns and rows the Grid can use.
This page has no Excel import button. The top Excel button exports. Distinguish file parsing from updating your app's table data.
Useful terms
- ArrayBuffer
- A format holding the selected file's original bytes.
- snapshot
- The selected sheet converted to column definitions and a row array.
API reference
#Events1
| Events | Detail type | Description |
|---|---|---|
GridXlsxImportedDetail | Fires after `importDataFromXlsx` completes — payload carries the parsed snapshot. |
Methods1
| Method / Arguments | Return type | Description |
|---|---|---|
| source: ArrayBuffer | Uint8Array, options?: { sheetName?: string; snapshot?: SheetToRowDataOptions } | Promise<XlsxImportResult> | Parse an XLSX byte stream into `{ columnDefs, rowData }` and emit the `xlsxImported` event so a host can mirror the snapshot into its bound `rowData` / `columnDefs` props. Returns the parsed `XlsxImportResult` so callers can also inspect every sheet / shared strings / styles directly. |
Explore each feature
Learn when to use each feature and how to configure it. Each guide identifies live examples and features you connect in your app.