ExcelJS: Read and write Excel spreadsheet files
Parse, modify, and generate XLSX files in Node.js.
Learn more about exceljs
ExcelJS is a JavaScript library for reading, manipulating, and writing Excel spreadsheet files in XLSX format within Node.js environments. The library parses Excel workbooks into an object model that represents worksheets, cells, styles, formulas, and other spreadsheet elements as accessible data structures in memory. It provides both synchronous workbook loading for smaller files and streaming APIs that process rows incrementally to manage memory consumption when working with large datasets. The architecture supports bidirectional conversion between Excel's Office Open XML format and JavaScript objects, enabling programmatic modification of spreadsheet content, formatting, and metadata. This design allows integration into backend data processing pipelines, automated reporting systems, and ETL workflows that require Excel file generation or transformation.
Streaming File Processing
Reads and writes XLSX files row-by-row without loading entire workbooks into memory. Handles datasets with millions of rows while maintaining constant memory footprint, essential for server-side data pipelines.
Full Style Preservation
Maintains all Excel formatting including fonts, colors, borders, number formats, and conditional rules during read-write cycles. Ensures generated spreadsheets match corporate templates and brand requirements without manual styling.
Reverse-Engineered Format Support
Reads and writes complex Excel features through careful reverse engineering of the XLSX format. Supports charts, pivot tables, conditional formatting, and data validation without relying on Microsoft documentation.
const ExcelJS = require('exceljs');
const workbook = new ExcelJS.Workbook();
const sheet = workbook.addWorksheet('Sales');
sheet.columns = [
{ header: 'Product', key: 'product', width: 20 },
{ header: 'Price', key: 'price', width: 10 }
];
sheet.addRow({ product: 'Laptop', price: 999 });
sheet.addRow({ product: 'Mouse', price: 25 });
await workbook.xlsx.writeFile('sales.xlsx');Drops Node v8 support; upgrades jszip to v3.10.1+ (removes Snyk vulnerabilities); adds inlineStr cell type and custom table auto-filters.
- –Upgrade to Node v10+ minimum; v8 is no longer supported in CI or type definitions.
- –Update jszip dependency to v3.10.1+ to eliminate known vulnerabilities flagged by Snyk.
See how people are using exceljs
Top in Data Engineering
Related Repositories
Discover similar tools and frameworks used by developers
HikariCP
Zero-overhead JDBC connection pooling for production Java applications.
patroni
Automates PostgreSQL failover using distributed consensus systems.
pdfplumber
Python library for extracting PDF text and tables.
flyway
Version-controlled SQL migrations with automated execution tracking.
ioredis
Robust TypeScript Redis client supporting clusters and Sentinel.