
ExcelJS
A JavaScript library for reading, editing and writing Excel XLSX spreadsheet files.
- Stars
- 15.5k
- Forks
- 2.1k
- Licence
- MIT
- Language
- JavaScript
- Last update
- 1.8 years ago
- Type
- Library
No commits in over a year — check for forks or alternatives before adopting.
What it is
ExcelJS is a JavaScript package that lets a program read, change, and create Excel spreadsheet files in the XLSX format, including cell data and styles. It can also work with JSON and CSV-style data, according to its description and topics. Developers use it to generate reports or process spreadsheets without opening Excel.
- Generate an Excel report from a database query result in a Node.js script
- Read rows from an uploaded XLSX file and convert them to JSON
- Apply cell styles, worksheet properties, or page setup when writing a workbook
- Add a pivot table or table with auto-filter to a generated workbook (listed in recent README changes)
Great for
- Node.js developers who need to generate Excel reports from application data
- Developers who need to read spreadsheet data and process it in code
- Teams automating spreadsheet exports or imports
- Projects that need to handle large workbooks via streaming (the topics list streaming workbook support)
Not ideal for
- People who just want to open or edit a spreadsheet by hand; this is a code library, not a spreadsheet app
- Users who need legacy binary .xls files, since the README focuses on XLSX
- Non-programmers, because using it requires writing JavaScript
How to get it
- 1
Install with a package manager
You'll need: Node.js
Install the package
npm install exceljs - 2
Run it
- Install the package with npm install exceljs in your project folder.
- Import ExcelJS in a Node.js script.
- Create a workbook and add a worksheet.
- Add some rows of data to the worksheet.
- Write the workbook to a file and open it in Excel to check the result.
- 3
Get the most out of it
- Use the streaming workbook classes for very large files, as suggested by the repository topics
- Check the README sections on worksheet properties, page setup, and styles for formatting control
- Read the TypeScript type definitions mentioned in the changelog if you use TypeScript
- Review the full README table of contents for import and interface details
Downloads
Strengths
- Covers reading, writing and styling XLSX files in one package
- Installs with a single npm command
- Has an active project history with many merged contributions listed in the README
Trade-offs
- The README is truncated in this listing, so full API coverage and limits are not confirmed here
- Pivot table support is described as limited in the changelog
- Last code push date is January 2025, so check recent activity before relying on it for new work
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| exceljs (this) | 15.5k | Library | intermediate | 1.8 years ago | Node.js developers who need to generate Excel reports from application data |
| PapaParse | 13.6k | Library | intermediate | 10 days ago | JavaScript developers who need to import CSV files in a web page |
| PhpSpreadsheet | 14k | Library | intermediate | 4 days ago | PHP developers who need to generate or import spreadsheet files from a web app or script |
| Laravel-Excel | 12.7k | Library | intermediate | 14 days ago | Laravel developers who need to export database query results to Excel or CSV |
| Luckysheet | 16.6k | Library | intermediate | 1.2 years ago | Developers maintaining an existing site that already embeds Luckysheet |
| yq | 16.2k | CLI | beginner | 8 days ago | Developers who regularly edit YAML config files in scripts or CI pipelines |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.