Migrating from @sheet/edit
@agent-sheet/wasm is a drop-in replacement for code written against
@sheet/edit 2.20260615.1. It implements the same workbook model, function names and
options. Review Known differences before shipping.
Change your import
Section titled “Change your import”Install the SDK:
npm install @agent-sheet/wasmReplace the @sheet/edit package specifier in your imports with @agent-sheet/wasm:
const XLSX = require("@agent-sheet/wasm");console.log(XLSX.utils.aoa_to_sheet([["ready"]]).A1.v);readyFor native Node ESM, use the default import:
import XLSX from "@agent-sheet/wasm";import assert from "node:assert/strict";assert.equal(XLSX.utils.aoa_to_sheet([["ready"]]).A1.v, "ready");Native ESM named imports are not supported. TypeScript import patterns are described in TypeScript.
Keep existing code unchanged
Section titled “Keep existing code unchanged”An npm alias installs the new package under the old dependency name. Existing calls
to require("@sheet/edit") then resolve to the SDK without changing those calls.
{ "dependencies": { "@sheet/edit": "npm:@agent-sheet/wasm@^0.2.0" }}Run your package manager’s install command after changing package.json.
Transitive dependencies
Section titled “Transitive dependencies”If another library depends on @sheet/edit, also override that dependency.
The following configurations apply the same alias throughout the dependency tree.
Merge the fields into your existing package.json.
{ "dependencies": { "@sheet/edit": "npm:@agent-sheet/wasm@^0.2.0" }, "overrides": { "@sheet/edit": "$@sheet/edit" }}$@sheet/edit references the direct dependency specifier and avoids a conflicting
direct-dependency override. If there is no direct dependency, set the override value
to "npm:@agent-sheet/wasm@^0.2.0" instead.
{ "dependencies": { "@sheet/edit": "npm:@agent-sheet/wasm@^0.2.0" }, "pnpm": { "overrides": { "@sheet/edit": "npm:@agent-sheet/wasm@^0.2.0" } }}{ "dependencies": { "@sheet/edit": "npm:@agent-sheet/wasm@^0.2.0" }, "resolutions": { "@sheet/edit": "npm:@agent-sheet/wasm@^0.2.0" }}Check the resolution rules for your package manager version and inspect the installed dependency tree. Run your application’s tests, including the libraries using the alias.
Runtime checklist
Section titled “Runtime checklist”- Use Node.js 22 or newer. Chromium and Firefox are the tested browsers.
- In browser CSP, allow
'wasm-unsafe-eval'inscript-src. See Browsers and CSP. - Use the bundled SDK, not the raw WebAssembly file. No initialization promise is needed.
- Replace any use of the old package’s CLI with JavaScript API calls; no CLI ships with this SDK.
- Check format-dependent metadata preservation and unavailable encryption helpers in Known differences.
XLSX.version remains 2.20260615.1, the compatibility API version. npm releases
such as 0.2.0 use an independent version number.