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');Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
Grbl
Real-time motion control firmware for Arduino-based CNCs.
code-server
Run VS Code on remote servers via browser.
open-directory
Command-line search engine for indexed open directories.
PowerShell
Cross-platform shell and scripting language for system administration with structured data support.
Floki
Elixir HTML parser with CSS selectors and multiple parser backends.
Related Reading
Guides and comparisons from the Greptile content library
Choosing the Right Code Review Tool: Better Alternatives to Graphite AI
A breakdown of the best alternatives to Graphite for code reviews. Compare AI tools like Trag, open-source solutions like Gerrit, and database-focused platforms like Visual Expert.
Greptile Ranks #1 on Martian's AI Code Review Benchmark
Greptile ranks #1 on Martian's independent online AI code review benchmark, leading all evaluated tools in F1 score and precision with near-leading recall.
Best Developer Productivity Tools in 2026
The best developer productivity tools in 2026, compared by the workflow problem they solve: code review, autocomplete, AI-native editing, terminal agents, code search, observability, and security.
Best AI Code Review Tools for GitHub
Top-rated AI code review tools for GitHub teams in 2025. Compare features, pricing, and accuracy to find the perfect fit for faster PR reviews and bulletproof code quality.