Excel Output
Write the incoming row stream to a single-sheet
.xlsxworkbook. Set the filename and the sheet name; column order and headers come from the row keys. Excel Output collects the entire stream in memory before writing because the SheetJS writer is not streaming.
How it works
Section titled “How it works”Excel Output is a sink node that consumes a row stream and produces an application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Blob. SheetJS requires the full row set to build a worksheet, so this transform is batch-only — peak memory scales with row count.
The worksheet is built by XLSX.utils.json_to_sheet, which uses the first row’s keys as the header row in row-1 and writes subsequent rows in the order their keys appear. Numeric values stay numeric, strings stay strings, and null/undefined cells are omitted entirely (Excel renders empty cells, not blank strings).
The workbook is tagged with a Comments property identifying FileBender as the generator. The output Blob carries the standard XLSX MIME type so browsers offer the right open-with handlers.
Input: A row stream from any upstream transform.
Output: An .xlsx Blob.
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
filename | string | output.xlsx | Suggested download filename. Must be non-empty. |
sheetName | string | Sheet1 | Name of the single worksheet inside the workbook. Must be non-empty. |
Examples
Section titled “Examples”Basic export with default sheet name
Section titled “Basic export with default sheet name”A monthly revenue report exported to Excel.
Before:
| month | revenue | new_customers |
|---|---|---|
| 2026-01 | 48200 | 14 |
| 2026-02 | 51900 | 18 |
| 2026-03 | 55400 | 21 |
Configuration: defaults — filename: "output.xlsx", sheetName: "Sheet1".
After: an .xlsx workbook with one sheet Sheet1 containing the rows above, with month, revenue, new_customers as the header row.
Custom filename and sheet name
Section titled “Custom filename and sheet name”A finance team wants the file to be called q1-2026-revenue.xlsx with the data on a sheet called Q1.
Before: same rows as above.
Configuration: filename: "q1-2026-revenue.xlsx", sheetName: "Q1".
After: a workbook saved as q1-2026-revenue.xlsx containing one sheet named Q1.
Tips and Edge Cases
Section titled “Tips and Edge Cases”- Memory scales with the full dataset. Excel Output buffers every row before invoking the SheetJS writer. For inputs above ~100k rows, expect noticeable memory pressure in the browser; use CSV Output if streaming is required. See
apps/web/src/transforms/output-xlsx/logic.ts:82-95. - Header order comes from the first row’s key order.
json_to_sheetderives column headers from the union of keys, but row 1’s key order wins for ties. To fix the column order deterministically, run Reorder Columns immediately upstream. Seeapps/web/src/transforms/output-xlsx/logic.ts:99-104. - Sheet names have an Excel-imposed 31-character limit. SheetJS will truncate or reject names longer than 31 characters and rejects the characters
\ / ? * [ ]. The Zod schema only enforces non-empty — invalid names will surface as SheetJS errors at write time. Seeapps/web/src/transforms/output-xlsx/logic.ts:18-22.
Related Transforms
Section titled “Related Transforms”- CSV Output — write plain text CSV instead of binary
.xlsx(streaming, lower memory). - JSON Output — write a JSON array or NDJSON when the consumer is a script or API.
- Reorder Columns — fix column order before serialisation.