
Reading Excel in the Browser With SheetJS Without a Server
Parse an uploaded Excel file in the browser with SheetJS: read it, pick a sheet, convert to JSON, handle dates, limits and security, then export a workbook.
Tag
17 posts

Parse an uploaded Excel file in the browser with SheetJS: read it, pick a sheet, convert to JSON, handle dates, limits and security, then export a workbook.

Read and write xlsx in Node.js with exceljs: load a workbook, read typed cells, handle formulas and dates, stream large sheets and avoid common traps.

fast-xml-parser returns objects, but its defaults drop attributes and turn 007 into 7 and 29.50 into 29.5. Set the options, validate, and see the 4.4 s cost.

DOMParser reads XML in the browser but reports errors as a parsererror element, not an exception. Query with XPath, handle namespaces, compare with HTML mode.

The extra arguments of JSON.stringify and JSON.parse, tested in Node 24: toJSON, replacer arrays, indent limits, call order and exact numbers.

A tested guide to JSON in JavaScript and Node 24: what stringify drops, parse errors, big numbers, dates, circular data, cloning, files and large inputs.

A CSV from your web app opens as Zoë in Excel. Check the bytes, the charset header and the BOM the server sends, then fix Express, Blobs and file names.

Turn an array of objects into CSV in JavaScript by hand or with csv-stringify: quoting, dates, booleans, formulas, BOM and a streaming writer.

Load 2,000,000 CSV rows into PostgreSQL and SQLite from Node and compare per-row inserts, batches, transactions and COPY, with timings and failure behavior.

Convert a CSV to JSON or NDJSON in Node with csv-parse, keep ZIP codes as text, and stream 2,000,000 rows at 120 MB instead of 1.6 GB.

line.split(',') breaks on quoted commas, quotes, line breaks and CRLF. See the failures, why the regex fix is slow, and a 30 line parser that works.

Build a CSV string, wrap it in a Blob and trigger a download with an object URL. Covers escaping, the Excel BOM, formula guards and how 1,000,000 rows behave.