@nhtio/adk/batteries/media/engines/exceljs
The ExcelJS-backed workbook @nhtio/adk/batteries/media/contracts!MediaEngine: the fidelity-preserving structural editor for xlsx, plus in-process blank-workbook generation.
Remarks
ExcelJS models the parts of a workbook that matter to humans — fonts, fills, comments, merged ranges, data validations — and carries them through a read→edit→write cycle intact. That is this engine's whole reason to exist: the sheet.* verbs mutate workbooks users hand us, and an edit that strips the user's formatting as a side effect is corruption with good intentions. Compose this engine FIRST in the engines array when fidelity matters; the sheetjs engine edits a far wider read matrix (ODS, XLS, NUMBERS, …) but SheetJS Community Edition strips styling in the process.
Capabilities:
- generate:
EMPTY_MIME→ xlsx (a blank workbook with oneSheet1— every sheet step expects at least one worksheet). - edit: the ten
sheet.*structural ops over xlsx, styling preserved.
exceljs is an optional peer dependency, lazily imported on first actual use. Cross-env by construction: no node:* imports, Uint8Array in and out (ExcelJS ships a browser build via its browser field).
Interfaces
| Interface | Description |
|---|---|
| ExceljsEngineOptions | Options for exceljsEngine. |
Functions
| Function | Description |
|---|---|
| exceljsEngine | Construct the ExcelJS-backed workbook engine. |