Skip to content

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.

Install the SDK:

Terminal window
npm install @agent-sheet/wasm

Replace 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);
Output
ready

For 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.

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.

package.json
{
"dependencies": {
"@sheet/edit": "npm:@agent-sheet/wasm@^0.2.0"
}
}

Run your package manager’s install command after changing package.json.

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.

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.

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.

  1. Use Node.js 22 or newer. Chromium and Firefox are the tested browsers.
  2. In browser CSP, allow 'wasm-unsafe-eval' in script-src. See Browsers and CSP.
  3. Use the bundled SDK, not the raw WebAssembly file. No initialization promise is needed.
  4. Replace any use of the old package’s CLI with JavaScript API calls; no CLI ships with this SDK.
  5. 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.