Type-safe Excel (.xlsx) reports for TypeScript: typed schemas, real formulas, styles, native Excel tables and streaming exports in Node.js, Bun and Deno.
https://typed-xlsx.vercel.app ↗// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
// how to help
// readme
· · ·
typed-xlsx is a TypeScript library for generating Excel files. You define the columns of a report once, typed against your row type, and it writes the .xlsx for you: header row, values, number formats and styles. If an accessor points to a field that doesn’t exist on your type, it doesn’t compile.
It works the same for a simple data export and for a big styled report. Formulas, totals, Excel tables and charts are all optional, you add them to the schema when you need them. For large exports there’s a streaming version that takes the same schema.
It only writes .xlsx files, it doesn’t read them.
npm install typed-xlsx
No runtime dependencies. Works on Node.js, Bun and Deno. Other runtimes (Workers, browsers) work too, but createWorkbook() files are written uncompressed there unless the runtime exposes Node’s zlib, see Installation.
Requires Node.js 20 or later (or Bun, or Deno) and TypeScript 5.7 or later. The type declarations mention Node’s Buffer, so install @types/node for type-checking.