Skip to content

v10.0.0

Choose a tag to compare

@cjnoname cjnoname released this 10 Jun 11:30
· 4 commits to main since this release
443f0c2

🚀 ExcelTS 10.0.0 — the final major release

Read this first. This is the last major version of ExcelTS in its current shape.

Work is already underway on a brand-new project that re-architects the Excel core from the ground up for first-class tree-shaking — so you only pay for the bytes you actually import. The current monolithic Workbook surface makes deep tree-shaking impossible; the next project fixes that at the structural level while keeping the zero-dependency, cross-platform, streaming-first philosophy.

You don't need to worry about migration. The new project is being designed to be trivially portable. I will ship a complete, AI-ready migration guide so an AI agent can move an existing ExcelTS codebase to the new project in a single pass — no manual rewrites, no guesswork. Stay on 10.x with confidence; upgrading later will be effortless.


📄 Headline: the Word module is now official

This release graduates Word (DOCX) to a first-class, fully documented module — bringing ExcelTS to nine modules (Excel, Word, Formula, PDF, CSV, Markdown, XML, Archive, Stream).

A zero-dependency, cross-platform DOCX toolkit that reads, writes, and converts Word documents:

  • Authoring — paragraphs, headings, rich-text runs, tables (merges + nesting), images (inline/floating, incl. SVG with raster fallback), bulleted/numbered/multi-level lists, sections, headers/footers, page layout
  • References & fields — hyperlinks, bookmarks, table of contents, footnotes/endnotes/comments, and a field engine (PAGE/NUMPAGES, TOC, INDEX/XE, REF, SEQ, STYLEREF, formulas)
  • Rich content — OMML math, drawing shapes (fill/line/gradient/shadow/glow/3-D), charts (preserved + from-scratch builder, bridged to the Excel chart engine)
  • Editing & review — read/modify, text search/replace, format-aware queries, track-changes accept/reject, document diff & merge
  • Templating & data{{variable}} / {{#if}} / {{#each}} templates, mail merge, form fields & content controls (SDT), OpenDoPE data binding
  • Conversion — DOCX ↔ HTML, DOCX ↔ Markdown, Excel → Word, Word → PDF
  • Production concerns — font embedding with subsetting, document protection, Agile-encryption decrypt/encrypt, digital-signature inspection, Flat OPC, streaming writer, validation, ISO 29500 Strict normalization, and full browser support

Docs: src/modules/word/README.md · 中文 · 47 runnable examples under src/modules/word/examples/.

import { Document, toBuffer, readDocx } from "@cj-tech-master/excelts/word";

const doc = Document.create();
Document.addHeading(doc, "Report", 1);
Document.addParagraph(doc, "Generated by ExcelTS.");
const bytes = await toBuffer(Document.build(doc));

📦 What's in this release

Full diff: v9.6.1...v10.0.0

⚠ BREAKING CHANGES

  • word: markdownToDocx and markdownToDocxBody are now async; markdownToDocxBody returns MarkdownBodyResult instead of BodyContent[].

Features

  • Add support for glossary (Building Blocks) and OLE embedded objects (19beef5)
  • excel: Add shapes, SVG images, configurable note size, nested column keys (ad7c201)
  • word: Embed images and footnotes in markdown-to-docx conversion (9ec00a6)
  • word: Enhance glossary handling with self-contained sub-documents and strict gallery validation (d82b397)
  • word: Enhance watermark functionality with custom dimensions and improved rendering (b780dbb)

Bug Fixes

  • pdf: Preserve non-WinAnsi text and improve DOCX→PDF flow fidelity (5b34a35)
  • word: Correct HTML→DOCX class style merging and list/image handling (8264c23)
  • word: Correct list IR conversion, compat-mode round-trip, and INDEX field (a8bf9bc)
  • word: Correct math phantom visibility, MathML run tokenization, style-map overrides, and theme color casing (82e6dd6)
  • word: Hide empty degree when importing a square root from MathML (aaf6992)
  • word: Preserve list structure and numbering format in ODT round-trip (bf6736a)