Installation
@agent-sheet/wasm is the spreadsheet SDK from Agent Sheet.
It implements the @sheet/edit-compatible API, powered by a WebAssembly engine.
Requirements
Section titled “Requirements”- Node.js 22 or newer, or a current Chromium or Firefox browser.
- In browsers, Content-Security-Policy must allow
'wasm-unsafe-eval'inscript-src. See Browsers and CSP.
Install the package
Section titled “Install the package”npm install @agent-sheet/wasmpnpm add @agent-sheet/wasmyarn add @agent-sheet/wasmNo 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.
Import the SDK
Section titled “Import the SDK”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]])));2.20260615.11,23,4Native 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.
Browser script
Section titled “Browser script”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.
Existing @sheet/edit projects
Section titled “Existing @sheet/edit projects”Change the package import, or keep existing code unchanged with a dependency alias. See Migrating from @sheet/edit for direct and transitive dependencies.
License and contact
Section titled “License and contact”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.