Move fast and break no spreadsheets.
The lossless TypeScript engine for editing real XLSX and XLSM files without breaking formulas, styles, charts, pivots, macros, or layout.
npm install @ironsheet/nodeimport { mutateWorkbookFile } from "@ironsheet/node";
const report = await mutateWorkbookFile("template.xlsx", "report.xlsx", async (workbook) => {
await workbook.patchCell("Summary", "B2", "Q1");
await workbook.patchNamedRange("RevenueRange", [["North", 42000]]);
await workbook.replaceTableRows("RevenueTable", [["North", 42000]]);
});
if (!report.wrote) {
throw new Error("Ironsheet refused to write an invalid workbook");
}Open an existing workbook, make a narrow mutation, and write only if it still validates.
Preservation-first
Untouched ZIP entries and unknown XML — charts, styles, pivots, drawings — are preserved by default. Ironsheet patches only what you target.
Transactional template fills
Template rendering resolves anchors, validates resize plans, then applies one transaction. Fills update named ranges and tables without shifting layout.
Validation-gated writes
Safe writes validate the OOXML package before committing. Invalid output is refused and nothing touches your workbook.
Package + cell diffs
Every safe mutation returns diagnostics, validation results, and content-vs-container package diffs — proof of exactly what changed.
Macro-safe XLSM
Macro parts are preserved byte-for-byte. Generate and edit macro-enabled workbooks without breaking the VBA project.
Runtime-neutral core
A dependency-free, browser-compatible engine. Runtime-specific IO and compression live in thin Node and browser adapters.