Skip to content

Installation

@agent-sheet/wasm is the spreadsheet SDK from Agent Sheet. It implements the @sheet/edit-compatible API, powered by a WebAssembly engine.

  • Node.js 22 or newer, or a current Chromium or Firefox browser.
  • In browsers, Content-Security-Policy must allow 'wasm-unsafe-eval' in script-src. See Browsers and CSP.
Terminal window
npm install @agent-sheet/wasm

No separate WebAssembly download or initialization step is needed. The package does not ship a command-line tool. See Distribution files for the browser bundles and TypeScript declarations.

CommonJS:

const XLSX = require("@agent-sheet/wasm");
console.log(XLSX.version);
console.log(XLSX.utils.sheet_to_csv(XLSX.utils.aoa_to_sheet([[1, 2], [3, 4]])));
Output
2.20260615.1
1,2
3,4

Native Node ES modules use a default import:

import XLSX from "@agent-sheet/wasm";
import assert from "node:assert/strict";
assert.equal(typeof XLSX.read, "function");

Native ESM named imports are not supported. For TypeScript, use an import assignment or a default import with esModuleInterop. See TypeScript.

XLSX.version is the compatibility API version, not the npm release version. npm releases use their own version numbers (currently 0.2.x); the API version is 2.20260615.1.

A CDN that serves npm packages, such as jsDelivr, provides the full browser bundle:

<script src="https://cdn.jsdelivr.net/npm/@agent-sheet/wasm@0.2/dist/xlsx.full.min.js"></script>

It defines the global XLSX. You can instead serve dist/xlsx.full.min.js from your own application. Allow the CDN origin in your CSP when using it, and use a nonce, hash or separate script for your application code. See Quick start for browser and bundler examples.

Change the package import, or keep existing code unchanged with a dependency alias. See Migrating from @sheet/edit for direct and transitive dependencies.

The SDK is free to use, including in commercial products, under the Elastic License 2.0 with additional limitations for the WebAssembly engine. It is not an open-source license; for example, it does not allow offering the SDK as a hosted spreadsheet API. See License for a summary. The optional codepage tables are Apache-2.0 licensed under dist/cpexcel.LICENSE.

Questions about the SDK or its use: hello@agent-sheet.dev.