Skip to main content

Cellify

A lightweight, zero-dependency spreadsheet library for JavaScript and TypeScript

📦

Zero Dependencies

Only ~8KB gzipped. Cellify uses just fflate for ZIP compression. No bloated dependencies, no security vulnerabilities from transitive packages.

🔷

Full TypeScript Support

Written in TypeScript with complete type definitions. Get full IntelliSense, autocomplete, and compile-time type checking in your IDE.

📊

Excel Import & Export

Read and write .xlsx files with full support for styling, formulas, merged cells, freeze panes, and more. Round-trip your Excel files.

🎨

Rich Styling

Apply fonts, colors, borders, fills, alignment, and number formats. Create professional-looking spreadsheets programmatically.

📝

CSV Support

Import and export CSV files with automatic delimiter detection, type inference for numbers and dates, and RFC 4180 compliance.

🌐

Works Everywhere

Use in Node.js for server-side generation or in browsers for client-side Excel creation. Same API, same results.

Quick Start

Install Cellify with npm, yarn, or pnpm:

npm install cellify

Cellify works in both Node.js and browsers. Create Excel files with just a few lines of code.

Example
import { Workbook, workbookToXlsxBlob } from 'cellify';

// Create a workbook
const workbook = new Workbook();
const sheet = workbook.addSheet('Sales');

// Add headers
sheet.cell(0, 0).value = 'Product';
sheet.cell(0, 1).value = 'Revenue';

// Style headers
sheet.applyStyle('A1:B1', {
font: { bold: true, color: '#FFFFFF' },
fill: { type: 'pattern', pattern: 'solid', foregroundColor: '#059669' }
});

// Add data
sheet.cell(1, 0).value = 'Widget';
sheet.cell(1, 1).value = 15000;

// Export to Excel
const blob = workbookToXlsxBlob(workbook);