Skip to content

Why xlsx-format?

Most projects just need XLSX -- but the popular libraries ship with support for dozens of legacy formats, pull in 7-9 runtime dependencies, and lock you into synchronous APIs that block the event loop.

xlsx-format does one thing well: read and write modern Excel files. The result is a library you can actually tree-shake, await, and ship to the browser without a separate bundle.

Comparison

xlsx-formatSheetJS (xlsx)ExcelJS
Written inTypeScript (strict)JavaScript (with .d.ts)TypeScript
AsyncYes (streaming ZIP)NoPartial
Module formatESM + CJSCJS onlyCJS only
Tree-shakeableYesNoPartial
Runtime deps079
Browser supportYes (read / write)Yes (separate bundle)No
FormatsXLSX / XLSM / CSV / TSV / HTML30+ formatsXLSX / CSV
API styleNamed exports, asyncNamespace objectClass-based
Test coverage91%Not measuredNot measured
LicenseApache 2.0Apache 2.0MIT

Feature Support

What xlsx-format can read from and write to XLSX files at a glance.

Cell Data

FeatureReadWriteNotes
StringsYesYesVia shared string table or inline
NumbersYesYesFull floating-point precision
BooleansYesYesNative boolean cell type
DatesYesYesSerial numbers or ISO 8601 (cellDates option)
Error valuesYesYes#NULL!, #DIV/0!, #VALUE!, etc.

Formulas

FeatureReadWriteNotes
Cell formulasYesYesStored in cell.f
Array formulasYesYesRange reference in cell.F, dynamic array flag cell.D
Shared formulasYes--Expanded to individual cell formulas on read

Number Formats

FeatureReadWriteNotes
Built-in formatsYesYes164+ standard Excel format codes
Custom formatsYesYese.g. #,##0.00, yyyy-mm-dd, custom patterns
Format display textYesYesFormatted value in cell.w via full SSF engine

Styles

FeatureReadWriteNotes
Rich text (bold, italic, underline, color)YesYesPreserved in shared strings
Cell number format referencesYesYesStyle index maps to format codes
Fonts / Fills / Borders----Minimal defaults only; no cell-level styling API

Comments

FeatureReadWriteNotes
Legacy commentsYesYesECMA-376 format with VML positioning
Threaded commentsYesYesModern reply-chain format
Comment authorsYesYesAuthor list and people mapping

Hyperlinks

FeatureReadWriteNotes
External URLsYes--Parsed from relationships
Internal linksYes--#Sheet2!A1 syntax
TooltipsYes--Stored in cell.l.Tooltip

Sheet Structure

FeatureReadWriteNotes
Multiple sheetsYesYesOrdered sheet list with unique names
Merge regionsYesYesRectangular merge ranges
Column widthsYesYesCharacter-unit widths
Row heightsYesYesPoint-based heights
Hidden columns / rowsYesYesVia hidden flag
Auto-filter rangeYesYesFilter range definition (no filter criteria)
Page marginsYesYesLeft, right, top, bottom, header, footer

Workbook & Metadata

FeatureReadWriteNotes
Sheet visibilityYesYesVisible, hidden, very hidden
Defined namesYesYesWorkbook-scoped and sheet-scoped
Document propertiesYesYesTitle, author, dates, keywords, etc.
Custom propertiesYesYesUser-defined key/value pairs
Date system (1904 mode)YesYesMac Excel legacy support
Dynamic array metadataYesYesXLDAPR spill-range support

Format Conversion

FeatureReadWriteNotes
JSON objectsYesYessheetToJson / jsonToSheet
Arrays of arraysYesYessheetToJson({ header: 1 }) / arrayToSheet
CSVYesYescsvToSheet / sheetToCsv
TSVYesYesVia separator option
HTML tablesYesYeshtmlToSheet / sheetToHtml

Not Yet Supported

Conditional formatting, data validation, frozen panes, charts, images, pivot tables, sparklines, VBA macros, digital signatures, sheet/workbook protection, outline grouping.