Quick Start (Node)

SheetXL for Node lets you create, modify, and save spreadsheet workbooks entirely server-side—perfect for automation, serverless, or offline processing.
New Project
The fastest way to get started with SheetXL is using our project wizard. It will create a new project with SheetXL pre-configured and ready to use.
- pnpm
- yarn
- npm
pnpm create sheetxl
yarn create sheetxl
npx create-sheetxl
...and follow the interactive prompts.
Existing Project
Install the SDK and IO packages using your preferred package manager:
- pnpm
- yarn
- npm
pnpm add @sheetxl/sdk @sheetxl/io
yarn add @sheetxl/sdk @sheetxl/io
npm install @sheetxl/sdk @sheetxl/io
Installation
Create a file called example.js
:
example.js
import SheetXL from '@sheetxl/sdk';
import WorkbookIO from '@sheetxl/io';
import fs from 'node:fs';
// Set your license key or use CLI to install
SheetXL.LicenseManager.setLicenseKey('visit https://my.sheetxl.com to generate a license key.');
// Create a new workbook
const workbook = new SheetXL.Workbook();
workbook.getRange('A1').setValues([['Hello World!']]);
// Export the workbook to a buffer
const buffer = await WorkbookIO.write({
workbook,
type: 'xlsx',
});
// Save to disk
fs.writeFileSync('my-workbook.xlsx', buffer);
console.log('Workbook saved as my-workbook.xlsx');
Run it with:
node example.js
API Documentation
See the full API reference for all available methods: