Skip to content

Why xlsx-format?

Most projects just need XLSX. A focused library keeps the bundle and workbook API small while leaving file-system I/O to the host application.

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-format 2.4.2SheetJS 0.18.12ExcelJS 4.4.0
Written inTypeScript (strict)JavaScript with typingsJavaScript with TypeScript types
AsyncPromise-based APISynchronous public APIPromise-based selected APIs
Module formatESM + CJSESM + CJSCJS + browser build
Tree-shakeableYesLimitedLimited
Browser supportYes (read / write)Yes (separate bundle)Yes (exceljs.browser.js)
FormatsXLSX / XLSM¹ / CSV / TSV / HTMLMany spreadsheet formatsXLSX / CSV
Styled reportsYesYesYes
API styleNamed exportsNamespace objectClass-based
LicenseApache 2.0Apache 2.0MIT

The version labels identify the snapshots used for this orientation table. The SheetJS package metadata advertises ESM/CJS entry points and browser bundles. ExcelJS documents its browser build and workbook API in its browser documentation.

Feature Support

¹ XLSM support covers workbook cell data and macro-free output containers. VBA projects are not read, preserved, or written. Do not use an XLSM read/write round trip when macros must survive unchanged.

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
Cell fontsYesYesName, size, bold, and RGB/ARGB color
Solid fillsYesYesForeground color for title rows, headers, and totals
BordersYesYesTop, right, bottom, left with thin or medium
AlignmentYesYesHorizontal, vertical, and wrap text

Comments

FeatureReadWriteNotes
Legacy commentsYesYesECMA-376 format with VML positioning
Threaded commentsYesYesModern reply-chain format
Comment authorsYesYesAuthor list and people mapping
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
Frozen panesYesYesTop rows and/or left columns via !views
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, charts, images, pivot tables, sparklines, VBA macros, custom theme XML, calculation-chain exposure, raw ZIP entry exposure, digital signatures, sheet/workbook protection, outline grouping.