Alternatives

TabularJS vs read-excel-file

read-excel-fileis a focused library for one job: reading .xlsx files in the browser or Node.js. It returns typed values (numbers, booleans, Date objects) and has aschema option that turns rows into validated objects. TabularJS is a reader for many spreadsheet formats (XLSX, XLS, ODS, CSV, HTML tables and older formats) behind a single await tabularjs(file) call, returning every worksheet as a 2D array.

Everything on this page was run against read-excel-file 9.3.13 and tabularjs 2.2.0 on the same test files. If your users only upload .xlsx, read-excel-file is smaller and gives you typed objects out of the box. If they upload whatever their tools export, TabularJS reads it with one code path.

At a glance

Featureread-excel-fileTabularJS
Formats read.xlsx onlyXLSX, XLS, ODS, CSV, TSV, TXT, HTML tables, XML Spreadsheet 2003, SYLK, DIF, DBF, Lotus 1-2-3, Numbers (experimental)
Main callreadSheet(file) for one sheet; default export for all sheetsawait tabularjs(file), always all sheets
Row output2D array of string, number, boolean, Date or null2D array in worksheets[i].data
Rows to typed objectsYes: schema with type, required, oneOf, validateNo: map rows yourself
DatesDate objectsExcel serial numbers, number format in cells[address].format
Formula cellsValue saved by ExcelFormula text, e.g. "=SUM(D2:D4)"
Empty cellsnull'' (empty string)
Text cellsTrimmed by default (trim: false to keep)Kept as is
Trailing empty rowsDroppedKept up to the sheet dimension
Input (browser)File, Blob, ArrayBufferFile, Blob, ArrayBuffer, Uint8Array, HTML string, DOM element
Input (Node.js)Path, Stream, Buffer, BlobPath, Buffer, Uint8Array, Blob
Web Worker buildYes (read-excel-file/web-worker)No
Bundle size (min / gzip)~69 KB / ~20 KB~199 KB / ~67 KB
Runtime dependencies4 (fflate, saxen, unzipper-esm, worker-f)2 (jszip, @lemonadejs/html-to-json)
LicenseMITMIT
Writes filesNo (separate write-excel-file package)No
Latest version9.3.13, Oct 27, 20262.2.0, Oct 29, 2026

Bundle size: a one-line entry (import x from 'pkg'; window.x = x;, usingreadSheet from read-excel-file/browser) bundled withesbuild --bundle --minify --platform=browser --format=esm (esbuild 0.28.2), then gzip -9. Measured 69,062 / 20,005 bytes for read-excel-file and 199,340 / 66,754 bytes for tabularjs.

Same task: read an uploaded file

Both read a File from an <input type="file"> without extra conversion.

read-excel-file.jsjs
import { readSheet } from 'read-excel-file/browser';

input.addEventListener('change', async (e) => {
    // First sheet, as an array of rows
    const rows = await readSheet(e.target.files[0]);
    render(rows);
});
tabularjs.jsjs
import tabularjs from 'tabularjs';

input.addEventListener('change', async (e) => {
    const result = await tabularjs(e.target.files[0]);
    render(result.worksheets[0].data);
});

In Node.js, read-excel-file is imported from read-excel-file/node and accepts a path, stream or Buffer; tabularjs is the same import everywhere and accepts a path, Buffer or Uint8Array.

Output for the same file

Test workbook: a People sheet with a header row, a date column formattedyyyy-mm-dd, booleans, a number column, formulas in the Totalcolumn (=D2*2, =D3*2, and =SUM(D2:D4) in E5), empty cells, a name with surrounding spaces, and a second sheet named Totals.

read-excel-file outputjs
// await readSheet(file)
[
  ['Name', 'Born', 'Married', 'Kids', 'Total'],
  ['John Smith', new Date('1995-01-01T00:00:00.000Z'), true, 3, 6],
  ['Kate Brown', new Date('2010-03-01T00:00:00.000Z'), false, 0, 0],
  ['Ann Lee', null, true, null, null],
  [null, null, null, null, 3]
]
tabularjs outputjs
// (await tabularjs(file)).worksheets[0]
data: [
  ['Name', 'Born', 'Married', 'Kids', 'Total'],
  ['John Smith', 34700, true, 3, '=D2*2'],
  ['Kate Brown', 40238, false, 0, '=D3*2'],
  ['  Ann Lee ', '', true, '', ''],
  ['', '', '', '', '=SUM(D2:D4)']
]
cells.B2:   { format: 'yyyy-mm-dd' }
columns[0]: { title: 'A', ... }

Multiple sheets

read-excel-file.jsjs
import readExcelFile from 'read-excel-file/browser';

const sheets = await readExcelFile(file);
// [{ sheet: 'People', data: [...] }, { sheet: 'Totals', data: [...] }]

// Or one sheet by number (from 1) or name:
const totals = await readSheet(file, 'Totals');
tabularjs.jsjs
import tabularjs from 'tabularjs';

const { worksheets } = await tabularjs(file);
// [{ worksheetName: 'People', data: [...], ... },
//  { worksheetName: 'Totals', data: [...], ... }]

const totals = worksheets.find((ws) => ws.worksheetName === 'Totals');

Typed objects: schema vs mapping by hand

This is read-excel-file's strongest feature. A schema maps header titles to properties, checks types and required values, and reports errors with row and column. Errors are all-or-nothing: with any error, objects is undefined. In our test, the formula-only last row has no Name, so the call returned onerequired error for row 4.

read-excel-file.jsjs
import { readSheet } from 'read-excel-file/browser';

const schema = {
    name: { column: 'Name', type: String, required: true },
    born: { column: 'Born', type: Date },
    kids: { column: 'Kids', type: Number },
};

const { objects, errors } = await readSheet(file, { schema });
// errors: [{ error: 'required', column: 'Name', row: 4, ... }]
// objects is undefined when there is any error

TabularJS has no schema. The same objects take a few lines, including the date conversion, and you add validation yourself:

tabularjs.jsjs
import tabularjs from 'tabularjs';

// Excel stores dates as day counts (1900 date system)
const excelDate = (serial) => new Date(Math.round((serial - 25569) * 86400000));

const { worksheets } = await tabularjs(file);
const [header, ...rows] = worksheets[0].data;
const col = (title) => header.indexOf(title);

const objects = rows
    .filter((row) => row[col('Name')] !== '')
    .map((row) => ({
        name: String(row[col('Name')]).trim(),
        born: row[col('Born')] === '' ? null : excelDate(row[col('Born')]),
        kids: row[col('Kids')] === '' ? null : Number(row[col('Kids')]),
    }));
// [{ name: 'John Smith', born: Date(1995-01-01), kids: 3 }, ...]

The serial-to-date conversion assumes the default 1900 date system and dates after February 1900. This is also the migration path if you move from read-excel-file to TabularJS: replace readSheet(file, { schema }) with a mapping like the one above.

When to choose read-excel-file

When to choose TabularJS

Frequently asked questions

Can read-excel-file read .xls, .ods or .csv files?

No. read-excel-file reads .xlsx only. In our test, version 9.3.13 threw InvalidInputError (code XLS_FILE_NOT_SUPPORTED) for an .xls file, InvalidInputError (FILE_NOT_SUPPORTED) for a .csv file, and InvalidSpreadsheetError for an .ods file. TabularJS read all three with the same call it uses for .xlsx.

Which one is smaller?

read-excel-file. Bundled and minified with esbuild for the browser, importing readSheet from read-excel-file/browser came to about 69 KB minified and 20 KB gzipped. Importing tabularjs came to about 199 KB minified and 67 KB gzipped, because it ships parsers for 16+ formats in one function.

Does either library calculate formulas?

Neither evaluates formulas. read-excel-file returns the result that Excel saved in the file (6 for =D2*2). TabularJS returns the formula text ("=D2*2") in data and does not give you the saved result, so if you need computed values from formula cells, read-excel-file is the better fit.

How are dates returned?

read-excel-file returns JavaScript Date objects for cells with a date number format. TabularJS returns the Excel serial number (for example 34700 for 1995-01-01) and puts the number format in worksheets[i].cells[address].format, so you convert dates yourself.

Does TabularJS have a schema or validation feature like read-excel-file?

No. TabularJS returns rows as a 2D array; mapping rows to objects and validating them is up to you (a few lines of code, or a validation library such as zod). read-excel-file can map columns to typed objects, check required values and allowed values, and report errors with row and column.

Why does import readXlsxFile from "read-excel-file" no longer work?

read-excel-file had three major releases in 2026 (7.0 in February, 8.0 in March, 9.0 in April). In 7.x the browser entry moved to read-excel-file/browser; in 8.x the default export was replaced by the named export readSheet and the schema option was moved out (9.x added it back to readSheet). In 9.3.13 the package exposes only read-excel-file/browser, /node, /universal and /web-worker, and importing the bare name fails with ERR_PACKAGE_PATH_NOT_EXPORTED. Tutorials that use readXlsxFile(file, { schema }) describe the pre-8.x API.

Can I write Excel files with either library?

Both are read-only. The read-excel-file author publishes a separate package, write-excel-file, for writing .xlsx. TabularJS has no writer.

Try it on your own files

Install with npm install tabularjs and read any supported file with one call.