Skip to main content
zerotal

Documentation


Documentation / @zerotal/admin / index / toXlsx

Function: toXlsx()

toXlsx(rows, columns, options?): Uint8Array

Defined in: admin/src/actions/xlsx.ts:260

Build an .xlsx workbook: one sheet, a bold header row from the column labels, and one row per record with values typed rather than stringified.

The header row is frozen and an auto-filter is set over the used range, since an exported table is nearly always going to be sorted or filtered on arrival.

Parameters

rows

Record<string, unknown>[]

columns

Column[]

options?

sheet?

string

Returns

Uint8Array