gitwtfhub

wtf is xls-reader?

zanlucathiago/xls-reader — explained in plain English

Analysis updated 2026-05-18

21TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TL;DR

A small zero-dependency library that reads old .xls spreadsheet files in Node or the browser, replacing the abandoned SheetJS npm package.

Mindmap

mindmap
  root((xls-reader))
    What it does
      Reads legacy xls files
      Zero dependencies
      Works in Node and browser
    Tech stack
      TypeScript
      ESM and CJS
    Use cases
      Convert xls to JSON
      Convert xls to CSV
      CLI usage
    Audience
      Developers
      Legacy system maintainers
    License
      MIT permissive

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Read data out of legacy .xls files exported from old accounting or banking software.

REASON 2

Convert an .xls file to JSON or CSV from the command line without writing code.

REASON 3

Add .xls file support to a Node.js or browser app without adding heavy dependencies.

What's in the stack?

TypeScriptJavaScriptNode.js

How it stacks up

zanlucathiago/xls-reader1521620063/vomishieldagentfm-ai/agent-fm
Stars212121
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderateeasy
Complexity2/52/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

xls-reader is a small JavaScript and TypeScript library that reads old style .xls spreadsheet files, the format used by Excel 97 through 2003, technically called BIFF8. It works in both Node.js and web browsers, and it has zero external dependencies, meaning it does not pull in any other packages to do its job. The project exists because most modern tools, like ExcelJS, only understand the newer .xlsx format, and the one library that used to handle old .xls files, SheetJS, stopped publishing updates to the npm registry. That makes it hard for other tools like npm audit to check it for security problems. xls-reader fills that gap with a small, MIT licensed package that is still actively published to npm. Using it is straightforward. You call readXls on the raw bytes of an .xls file and get back a workbook object containing one or more sheets, each with rows of cells. There is also a readFirstSheet shortcut for files with just one sheet you care about, and a sheetToObjects function that turns rows into JavaScript objects using the first row as column names. A sheetToCsv function converts a sheet into a CSV string, following standard CSV quoting rules, with dates converted to ISO format. For people who do not want to write any code, the package also includes a command line tool. Running npx xls-reader on a file prints its contents as JSON, and flags let you pick a specific sheet, export as CSV instead, or compact the output onto a single line. The library handles the details of the old Excel format for you: numbers, dates, blank cells, and Excel error values like #DIV/0! all come back as sensible JavaScript types. It also reports whether each sheet in a workbook is visible or hidden. This tool is best suited for developers who need to read legacy spreadsheet files inside a Node or browser application, particularly anyone maintaining older business systems that still produce .xls exports, such as banking or accounting software.

Yoink these prompts

Prompt 1
Show me how to use xls-reader to read all sheets from an .xls file in Node.js and print each row.
Prompt 2
Write a Node.js script using xls-reader's sheetToObjects to convert an .xls file into an array of JSON objects.
Prompt 3
How do I use the xls-reader command line tool to convert report.xls into a CSV file for just one sheet?
Prompt 4
Help me handle CellError values like #DIV/0! when reading cells with xls-reader.

Frequently asked questions

wtf is xls-reader?

A small zero-dependency library that reads old .xls spreadsheet files in Node or the browser, replacing the abandoned SheetJS npm package.

What language is xls-reader written in?

Mainly TypeScript. The stack also includes TypeScript, JavaScript, Node.js.

What license does xls-reader use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is xls-reader to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is xls-reader for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.