Spreadsheets and CSV in the browser

Reading XLSX workbooks and writing Excel files with SheetJS — no Office install required.

What you can do

  • XLSX → CSV — export the first sheet as comma-separated values.
  • XLSX → JSON — export sheet rows as JSON.
  • CSV → XLSX — build a simple Excel workbook from a CSV file.

How it works (simple)

Reading Excel (XLSX)

  1. Read the file as an array buffer.
  2. Parse the workbook structure (sheets, rows, cells).
  3. Serialize the active sheet to CSV text or JSON.

Writing Excel (CSV → XLSX)

  1. Parse your CSV into rows.
  2. Create a new workbook with one sheet.
  3. Write the Office Open XML package and offer it as .xlsx.

Spreadsheet code is lazy-loaded — it downloads only when you pick an Excel-related conversion.

What runs in your browser

SheetJS (the xlsx package) is widely used for reading and writing Excel files in JavaScript. Official documentation: SheetJS docs

For CSV parsing when building XLSX, we also use the same CSV approach described in CSV and JSON.

Tradeoffs and limits

  • Multiple sheets: Exports typically use the first sheet unless the UI offers sheet selection.
  • Formatting & formulas: Output focuses on cell values, not full Excel styling or live formulas.
  • Large workbooks: Big files can be slow or memory-heavy in the browser.
  • Macros: Not supported.

See also