Alternatives

JavaScript libraries to read Excel files

We installed seven npm packages that read .xlsx files and ran each one on the same workbook on 2026-10-29. This page lists what they read and write, where they run, how big they are, and what they actually returned for formulas, dates and styles. There is no overall winner: the right library depends on what you need to do.

Disclosure: TabularJS is our library. The numbers below come from the same scripts for every package; see how we tested.

Quick recommendation by use case

Comparison table

LibraryReadsWritesRuns inLicenseWeekly downloadsLatest versionBrowser bundle (gzip)
SheetJS (xlsx)XLSX, XLSM, XLSB, XLS, ODS, CSV, HTML, SYLK, DIF, DBF, Lotus, Numbers and moreYes (most of the same formats)Node, browserApache-2.012,805,2120.18.5 on npm (2022-03-24); 0.20.3 on cdn.sheetjs.com142.3 kB (0.18.5) / 162.0 kB (0.20.3)
ExcelJSXLSX; CSV through a separate APIYes (XLSX, CSV)Node, browser (no streaming reader/writer in the browser)MIT20,979,2654.4.0 (2023-10-19)269.9 kB
read-excel-fileXLSX onlyNo (read-only)Node, browser, web workerMIT3,626,1719.3.13 (2026-10-27)19.3 kB
node-xlsxWhatever SheetJS reads (it wraps SheetJS 0.20.2)Yes (xlsx.build)NodeApache-2.0494,1860.24.0 (2024-04-15)n/a: imports fs (159.1 kB as a Node bundle)
xlsx-populateXLSX onlyYes (XLSX, keeps existing formatting)Node, browser (prebuilt browser file)MIT234,8861.21.0 (2020-03-01)209.3 kB (prebuilt browser/xlsx-populate.js)
convert-excel-to-jsonWhatever SheetJS 0.12.13 readsNo (JSON output only)Node, CLIMIT49,2641.7.0 (2020-06-08)n/a: Node file API (352.4 kB as a Node bundle)
TabularJSXLSX, XLS, ODS, CSV, TSV, TXT, HTML tables, XML 2003, SYLK, DIF, DBF, Lotus (WKS/WK1/WK3/WK4/123)No (read-only)Node, browserMIT5512.2.0 (2026-10-29)66.6 kB

Downloads: npm API, week of 2026-10-21 to 2026-10-27. Versions and dates: npm view on 2026-10-29. Bundle: one-line import bundled with esbuild 0.28.2 (--bundle --minify --format=esm --platform=browser), then gzip -9. Download counts include installs pulled in as dependencies of other packages.

What happened on the same .xlsx file

The test file is a real lab calculation workbook: 5 sheets (4 of them hidden, including the first one, "Flow"), 170 formulas and 53 merged ranges on the first sheet. Cell Flow!D6 holds=IF(C6>0,(C6-B6),"") with a saved value of 0.49801. The workbook has no date cells, so for dates we used a second file with one date cell (2026-01-15, formatyyyy-mm-dd), one formula and one bold cell.

LibraryRows (first sheet)Formula cell Flow!D6Date cellStylesMerged cells
SheetJS 0.18.5 / 0.20.342Both: v = 0.498…, f = IF(C6>0,(C6-B6),""), w = "0.49801"Serial 46037 with formatted text "2026-01-15"; a Date with cellDates: trueNo fonts in the free build (cellStyles returned only a fill pattern)53 (in !merges)
ExcelJS 4.4.042Both: { formula: 'IF(C6>0,(C6-B6),"")', result: 0.498… }Date objectYes (font, fill, borders per cell)53
read-excel-file 9.3.1339 (trailing empty rows dropped)Cached value only: 0.498…Date objectNoNo
node-xlsx 0.24.042Cached value only: 0.498…Serial number 46037NoNot in the default output
xlsx-populate 1.21.042Both: cell.value() and cell.formula()Serial 46037; the number format is readable with style("numberFormat")Yes (cell.style("bold") and others)Not tested
convert-excel-to-json 1.7.034 (empty rows skipped; objects keyed A, B, C…)Cached value only: 0.498…Date objectNoNo
TabularJS 2.2.042Formula text only: '=IF(C6>0,(C6-B6),"")', no computed valueSerial number 46037Yes, as CSS strings (372 styled cells)53 (in mergeCells)
excel-date.jsjs
// Excel serial number (1900 date system) to a JavaScript Date in UTC
const toDate = (serial) => new Date(Math.round((serial - 25569) * 86400000));

toDate(46037).toISOString(); // '2026-01-15T00:00:00.000Z'

Same workbook saved as .xls, .ods and .csv

Librarytest1.xlstest1.odstest1.csv
SheetJS 0.18.55 sheetsError: "Unsupported value type error"1 sheet
ExcelJS 4.4.0Error (not a zip file)0 sheets, no error52 rows (workbook.csv)
read-excel-file 9.3.13Error: legacy .xls not supportedErrorError
node-xlsx 0.24.05 sheetsError: "Unsupported value type error"1 sheet
xlsx-populate 1.21.0ErrorErrorError
convert-excel-to-json 1.7.05 sheetsError: "Unsupported value type error"1 sheet
TabularJS 2.2.05 sheets5 sheets1 sheet

SheetJS supports ODS in general; this particular .ods contains error cells (such as#DIV/0!), and SheetJS 0.18.5 and 0.20.3 both threw on them.

The libraries

SheetJS (xlsx)

The broadest format support of the group, for both reading and writing, and the long-time default. The catch is distribution: the xlsx package on npm stopped at 0.18.5 (2022-03-24), which has two unpatched high-severity advisories, CVE-2023-30533 and CVE-2024-22363. Newer releases are published only on cdn.sheetjs.com. Style reading and some other features are in the paid Pro edition. Details:the xlsx npm vulnerability.

terminalbash
# npm still serves 0.18.5; current releases come from the SheetJS CDN
npm install https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz
sheetjs.jsjs
import * as XLSX from 'xlsx';
import fs from 'fs';

const workbook = XLSX.read(fs.readFileSync('./file.xlsx'));
const sheet = workbook.Sheets[workbook.SheetNames[0]];
const rows = XLSX.utils.sheet_to_json(sheet, { header: 1 });

ExcelJS

The most downloaded package here and the usual choice for generating styled .xlsx files: fonts, fills, borders, formulas, data validation, streaming writes in Node. It reads styles back as well. It reads only .xlsx (and CSV through workbook.csv), it is the largest browser bundle we measured, and the last release was 4.4.0 in October 2023. npm audit flags a moderate advisory in its uuid dependency.

exceljs.jsjs
import ExcelJS from 'exceljs';

const workbook = new ExcelJS.Workbook();
await workbook.xlsx.readFile('./file.xlsx');

workbook.worksheets[0].eachRow((row) => {
  console.log(row.values); // 1-based: row.values[0] is empty
});

read-excel-file

Reads .xlsx only, and does it with the smallest bundle in the group. It converts date cells to Date objects and can map rows to objects with a schema that checks required fields and types. It is actively maintained (9.3.13 was released two days before our test). It rejects .xls, .ods and .csv files with a clear error.

read-excel-file.jsjs
import { readSheet } from 'read-excel-file/node';
// In the browser: import { readSheet } from 'read-excel-file/browser';

const rows = await readSheet('./file.xlsx'); // first sheet, 2D array

node-xlsx

A small wrapper around SheetJS with a simpler API: parse() returns[{ name, data }] and build() writes a file. Version 0.24.0 depends on SheetJS 0.20.2 from cdn.sheetjs.com, not the npm 0.18.5, so npm audit did not flag it. It imports fs, so it is for Node only.

node-xlsx.jsjs
import xlsx from 'node-xlsx';

const sheets = xlsx.parse('./file.xlsx'); // [{ name, data }]
console.log(sheets[0].data);

xlsx-populate

Built to open an existing .xlsx, change values and save it without losing the formatting, with a jQuery-like chaining API and support for password-protected files. It returns both the formula and the saved value. It reads only .xlsx, and the last release (1.21.0) is from March 2020. In the browser you load its prebuilt file; bundling the package entry for the browser failed because it requires fs and crypto.

xlsx-populate.jsjs
import XlsxPopulate from 'xlsx-populate';

const workbook = await XlsxPopulate.fromFileAsync('./file.xlsx');
const rows = workbook.sheet(0).usedRange().value();

convert-excel-to-json

A Node API and CLI that returns one array of objects per sheet, keyed by column letter, with options for ranges, header rows and column-to-key mapping. It depends on SheetJS^0.12.1 (0.12.13 installed), which npm audit flags with high-severity advisories, and has not been released since 2020. Fine for your own files; we would not run it on uploads.

convert-excel-to-json.jsjs
import excelToJson from 'convert-excel-to-json';

const result = excelToJson({ sourceFile: './file.xlsx' });
// { Sheet1: [{ A: 'Name', B: 'Email' }, { A: 'Ann', B: '[email protected]' }] }

TabularJS

One async function that reads XLSX, XLS, ODS, CSV, TSV, TXT, HTML tables, XML 2003, SYLK, DIF, DBF and Lotus files and returns the same shape for all of them:result.worksheets[i] with worksheetName, data (2D array) and columns, plus merged cells and styles where the format has them. It was the only library in the test that read all three of the .xls, .ods and .csv files. It is MIT licensed and read-only. Know the limits: formulas come back as text and are never evaluated, .xlsx dates are serial numbers, CSV values are strings, and the package is new (551 downloads in the test week).

tabularjs.jsjs
import tabularjs from 'tabularjs';

// A path in Node; a File, Blob or ArrayBuffer in the browser
const result = await tabularjs('./file.xlsx');
const rows = result.worksheets[0].data; // 2D array

How we tested

FAQ

What is the best JavaScript library to read Excel files?

It depends on the job. To write or edit .xlsx files, use ExcelJS or SheetJS. To read only .xlsx files into objects with a schema and a small browser bundle, use read-excel-file. To accept many input formats (XLS, ODS, CSV, HTML, DBF, Lotus and others) and get one output shape, use TabularJS, which is read-only.

Is the xlsx package on npm safe to use?

The latest xlsx on npm is 0.18.5, published on 2022-03-24. npm audit reports two high-severity advisories for it, CVE-2023-30533 (prototype pollution) and CVE-2024-22363 (ReDoS). SheetJS publishes newer versions (0.20.3 when we tested) only on cdn.sheetjs.com, so install from there if you use SheetJS.

How do I convert an Excel file to JSON in Node.js?

With TabularJS: const result = await tabularjs('./file.xlsx') gives result.worksheets[0].data as a 2D array. With SheetJS: XLSX.utils.sheet_to_json(sheet). With read-excel-file: await readSheet('./file.xlsx'). With convert-excel-to-json: excelToJson({ sourceFile }) returns one array of objects per sheet, keyed by column letter.

Which library has the smallest browser bundle?

In our measurement (esbuild bundle and minify, then gzip): read-excel-file 19.3 kB (XLSX only), TabularJS 66.6 kB, SheetJS 142.3 kB (0.18.5) or 162.0 kB (0.20.3), xlsx-populate 209.3 kB and ExcelJS 269.9 kB.

Do these libraries calculate formulas?

None of them evaluates formulas. SheetJS, ExcelJS and xlsx-populate return both the formula and the value that Excel saved in the file. read-excel-file, node-xlsx and convert-excel-to-json return only the saved value. TabularJS returns only the formula text, such as =SUM(A1:A3), and no computed value.

Which libraries can read .xls and .ods files?

In our test, SheetJS, node-xlsx and convert-excel-to-json read the .xls file, and TabularJS read both .xls and .ods. ExcelJS, read-excel-file and xlsx-populate read neither (ExcelJS returned an empty workbook for the .ods without an error). The SheetJS-based libraries threw an error on our .ods file, which contains error cells.

Which libraries can write Excel files?

SheetJS, ExcelJS, xlsx-populate and node-xlsx can write .xlsx files. read-excel-file, convert-excel-to-json and TabularJS only read.

Reading uploads in many formats?

TabularJS reads 16+ spreadsheet formats into one JSON shape, in Node and the browser.