Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosAndroid Police: Google needs to admit something.(20.09.2026 um 19:30 Uhr)
YouTube Security VideosNeil Patel: AI Turned Your Best Post Into a Free Sample #shorts(20.09.2026 um 20:04 Uhr)
YouTube Security VideosLinus Tech Tips: Linus vs Robot(20.09.2026 um 19:00 Uhr)
Videos & KonferenzenAlberta Tech: Programmer who forgot how to code(20.09.2026 um 19:00 Uhr)
Unix & Linux ServerBonjour! Firefox Smart Window Users Now Get to Use a French AI(18.09.2026 um 05:32 Uhr)
Sichere ProgrammierungStopping trains and signing autographs: a new trailer for Stick Hero(20.09.2026 um 20:00 Uhr)
YouTube Security VideosAndroid Police: Google needs to admit something.(20.09.2026 um 19:30 Uhr)
YouTube Security VideosNeil Patel: AI Turned Your Best Post Into a Free Sample #shorts(20.09.2026 um 20:04 Uhr)
YouTube Security VideosLinus Tech Tips: Linus vs Robot(20.09.2026 um 19:00 Uhr)
Videos & KonferenzenAlberta Tech: Programmer who forgot how to code(20.09.2026 um 19:00 Uhr)
Unix & Linux ServerBonjour! Firefox Smart Window Users Now Get to Use a French AI(18.09.2026 um 05:32 Uhr)
Sichere ProgrammierungStopping trains and signing autographs: a new trailer for Stick Hero(20.09.2026 um 20:00 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

I needed to read an old .xls file in Node and it was harder than it should be

Reagiere als Erste:r — dein Feedback zählt!

A few weeks ago I had a boring task: read some old .xls files (the Excel 97–2003 kind) and pull the numbers out. I figured this was a solved problem in 2026. It wasn't, quite.

ExcelJS, which most people reach for, only reads .xlsx. The old .xls binary format isn't in scope. Fair enough.

So I went for SheetJS, the library everyone points to for .xls. That's when I hit the real surprise: it's not on npm anymore. The last version on the registry is 0.18.5, it's frozen, and it has known advisories. The fixed builds live on their own CDN. Installing from a CDN is fine until you realize npm audit and Dependabot can't see it, so you quietly lose your vulnerability alerts for a library that parses untrusted binary files. That felt wrong for something going into a work project.

I looked around for a small, npm-published option that just reads the cells outof an .xls. Didn't find one I was happy with. So I wrote it.

It's called xls-reader:

npm install xls-reader

import { readFile } from "node:fs/promises";
import { readXls } from "xls-reader";

const workbook = readXls(await readFile("report.xls"));

for (const sheet of workbook.sheets) {
  for (const row of sheet.rows) {
    console.log(row); // ["BANCO X S/A", 1.1, 2024-04-02T00:00:00.000Z, ...]
  }
}

Cells come back already typed: strings, numbers, booleans, and dates as real Date objects. Blank and error cells are null.

If you need the rows as objects, using the header row as keys:

import { readFirstSheet } from "xls-reader";

const sheet = readFirstSheet(bytes);
const [header = [], ...body] = sheet?.rows ?? [];

const json = body.map((row) =>
  Object.fromEntries(header.map((key, i) => [String(key), row[i] ?? null])),
);

A few things I cared about while building it:

  • No runtime dependencies. It's about 4 KB min+gzip. It only uses Uint8Array and DataView, so it also runs in the browser (handy for a file ).
  • Published to npm with provenance. You can verify the build came from the repo's CI with npm audit signatures. This was the whole point for me.
  • TypeScript, dual ESM/CJS.

I want to be honest about what it does not do, because it's narrow on purpose: it's read-only, it reads values (not styles, charts, or merged-cell layout), and it only handles BIFF8. If you need to write files or read .xlsx, ExcelJS or SheetJS are still the right call.

If you've got an old .xls sitting around that it can't read, I'd genuinely like to know. A small sample file on the issues page helps a lot.

Repo: https://github.com/zanlucathiago/xls-reader
npm: https://www.npmjs.com/package/xls-reader

Thanks for reading.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten I needed to read an old .xls file in Node and it was harder than it should be

Thematisch verwandte Begriffe: needed, read, file, Node · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-93956 | A flaw has been found in olivier-ls PHP-FTS up to 1.1.2. Affected by thi…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick