Data is a workbook
Source rows come from a normal `.xlsx` file. The first row names the fields.
XTL 0.1 draft · TypeScript reference implementation
xl3 defines a small, conformance-tested language for using Excel workbooks as templates. Templates are workbooks. Data is a workbook. The output is still a workbook.
Interactive walkthrough
Scroll through the model. The example workbook on the right changes as each rule becomes active. The Excel visual stays familiar, but the behavior is defined by XTL and checked by conformance fixtures.
Source rows come from a normal `.xlsx` file. The first row names the fields.
Cells contain ordinary layout plus XTL expressions such as `{{ [Customer] }}`.
The result workbook keeps the sheet structure, number formats, styles, and merged cells.
Stage 1 checks cell values. Stage 2 compares canonical OOXML for formatting and structure.
Why a standard?
Many Excel automation tools are useful, but their behavior is often whatever a single library happens to do. That makes ports difficult and makes edge cases hard to discuss.
xl3 takes the opposite route: prose specification first, executable fixtures second, reference implementation third. The JavaScript package is useful, but the intended contract is XTL plus the conformance corpus.
Conformance
A value-only comparison is not enough for Excel. xl3 separates the bootstrap cell-value stage from canonical OOXML comparison.
Compares worksheet names and observable cell values. Useful for language semantics.
npm run conformance
Compares canonical workbook packages, including styles, number formats, merges, and structure.
xl3-conformance --comparison-stage=2
The TypeScript reference implementation currently passes the XTL 0.1 fixture corpus.
27 / 27 fixtures
Use it
$ npm install xl3
import { convert } from 'xl3';
const outputs = await convert(templateBuffer, dataBuffer);
// OutputFile[] -> formatted .xlsx workbook(s)