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.