Lattice Grid Buy a licence

The grid (core) ยท console.warn

grid.import.apply is synchronous and cannot inflate an .xlsx: await grid.import.xlsx(bytes) for the records (or grid.import.previewXlsx for a preview), then pass those to apply.

Printed by The grid (core), prefixed [lattice], since 1.40.0.

Warnings referenceimport.apply.bytes

Identifier
import.apply.bytes
Raised by
The grid (core)
Since
1.40.0

What happened

apply is synchronous, and an .xlsx is a zip that has to be inflated asynchronously. The bytes were recognised and refused, so nothing was imported and an empty record list was returned.

The fix

Await grid.import.xlsx(bytes) (or previewXlsx) and pass the records it returns to apply.

The smallest fix

const { records } = await grid.import.xlsx(bytes);
grid.import.apply(records);

Reference

Covered in full at the API reference.