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)
- Read the file as an array buffer.
- Parse the workbook structure (sheets, rows, cells).
- Serialize the active sheet to CSV text or JSON.
Writing Excel (CSV → XLSX)
- Parse your CSV into rows.
- Create a new workbook with one sheet.
- 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.