Skip to content

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
Step-by-step guide: how to use ExcelJSInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js

    Install the package

    npm install exceljs
  2. 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. 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

ProjectStarsTypeLevelUpdatedBest for
exceljs (this)15.5kLibraryintermediate1.8 years agoNode.js developers who need to generate Excel reports from application data
PapaParse13.6kLibraryintermediate10 days agoJavaScript developers who need to import CSV files in a web page
PhpSpreadsheet14kLibraryintermediate4 days agoPHP developers who need to generate or import spreadsheet files from a web app or script
Laravel-Excel12.7kLibraryintermediate14 days agoLaravel developers who need to export database query results to Excel or CSV
Luckysheet16.6kLibraryintermediate1.2 years agoDevelopers maintaining an existing site that already embeds Luckysheet
yq16.2kCLIbeginner8 days agoDevelopers 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.