npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

styled-exceljs

v0.21.1

Published

SheetJS Spreadsheet data parser and writer

Downloads

402

Readme

SheetJS

The SheetJS Community Edition offers battle-tested open-source solutions for extracting useful data from almost any complex spreadsheet and generating new spreadsheets that will work with legacy and modern software alike.

SheetJS Pro offers solutions beyond data processing: Edit complex templates with ease; let out your inner Picasso with styling; make custom sheets with images/graphs/PivotTables; evaluate formula expressions and port calculations to web apps; automate common spreadsheet tasks, and much more!

Documentation

Visual Fidelity

Install this build from the public npm registry:

npm install styled-exceljs

This build extends the SheetJS worksheet model for browser-oriented rendering of XLSX/XLS workbooks. The default read path remains lightweight and compatible. Visual metadata is exposed when explicit options are enabled:

const wb = XLSX.read(data, {
  type: "buffer",
  cellStyles: true,
  browserPixels: true,
  charts: true,
  drawings: true,
  validateMerges: true
});

const ws = wb.Sheets[wb.SheetNames[0]];
const html = XLSX.utils.sheet_to_html(ws, {
  cellStyles: true,
  browserPixels: true,
  autoFit: true,
  charts: true,
  drawings: true
});

The following public worksheet fields are populated when requested:

  • cell.s: resolved style object with font, fill, border, alignment, protection, numFmt, fgColor, and bgColor.
  • ws["!cols"] / ws["!rows"]: column widths and row heights including browser pixel fields (wpx, hpx) and default row/column styles.
  • ws["!mergeErrors"]: non-fatal merge validation issues in tolerant reads.
  • ws["!drawings"]: parsed images, shapes, anchors, raw fallback records.
  • ws["!charts"] and chartsheet ws["!chart"]: normalized chart models used by HTML SVG rendering.
  • XLSX.utils.auto_fit_columns(ws, opts): browser-measured best-fit column widths with wrap, overflow, shrink-to-fit, and merge-span handling.

XLSX.utils.validate_merges(ws, opts) validates merge ranges and reports duplicate, overlapping, invalid, or out-of-bounds ranges. Passing {WTF:true} or reading with {validateMerges:true} throws on invalid merges.

See docs/visual-fidelity.md for the full data structure reference and release notes for unsupported fallback behavior.

中文说明

从官方 npm registry 安装:

npm install styled-exceljs

这个版本面向浏览器预览和报表渲染扩展了 XLSX / XLS 的视觉读取能力。 默认读取路径仍然保持轻量和兼容;只有显式开启 cellStylesbrowserPixelsautoFitchartsdrawingsvalidateMerges 等选项时, 才会解析完整样式、浏览器像素尺寸、自动列宽、图片、绘图、图表和合并单元格 校验结果。

常用入口如下:

  • cell.s:解析后的完整样式对象,包括字体、填充、边框、对齐、保护和数字格式。
  • ws["!cols"] / ws["!rows"]:列宽、行高、隐藏状态、层级和浏览器像素值。
  • ws["!drawings"]:图片、形状、锚点和复杂绘图的 raw fallback。
  • ws["!charts"] / ws["!chart"]:工作表嵌入图表和图表工作表模型,可用于 SVG 渲染。
  • XLSX.utils.validate_merges(ws, opts):检查非法、重复、重叠和越界的合并单元格。
  • XLSX.utils.auto_fit_columns(ws, opts):结合浏览器文字测量、换行、溢出、 收缩适应和合并跨度计算最优列宽。

完整中文数据结构、选项说明和渲染行为请参考 docs/visual-fidelity.zh-CN.md

Constellation

  • https://oss.sheetjs.com/notes/: File Format Notes

  • ssf: Format data using ECMA-376 spreadsheet format codes

  • xlsx-cli: NodeJS command-line tool for processing files

  • cfb: Container (OLE/ZIP) file processing library

  • codepage: Legacy text encodings for XLS and other legacy spreadsheet formats

  • dta: Stata DTA file processor

License

Please consult the attached LICENSE file for details. All rights not explicitly granted by the Apache 2.0 License are reserved by the Original Author.