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

@paperjsx/json-to-xlsx

v0.0.1

Published

Generate Excel workbooks from JSON

Readme

@paperjsx/json-to-xlsx

Generate .xlsx workbooks from a JSON-friendly TypeScript document model.

Current engine capabilities:

  • strings via shared strings or inline strings
  • numbers and booleans
  • dates with automatic yyyy-mm-dd formatting
  • null omission
  • multiple sheets
  • fonts, fills, borders, alignment, and number formats
  • style presets
  • rich text inline strings
  • formulas with pass-through serialization and Phase 3 cached evaluation support
  • merges, freeze panes, filters, validations, hyperlinks, named ranges, and print setup
  • conditional formatting (cellIs, colorScale, dataBar, top10, duplicateValues, uniqueValues)
  • native Excel tables with totals rows and table styles
  • deterministic output by default
  • preflight workload analysis and string-strategy recommendations
  • workbook-level validation, repair, and validate-and-repair APIs for generated or third-party .xlsx buffers including content-type rebuilds, orphan-relationship cleanup, style-index clamping, unsafe-artifact stripping, duplicate table-name normalization, table-ref clipping, merge repair, worksheet-dimension recalculation, invalid hyperlink removal, data-validation-range clipping, and invalid defined-name removal for clearly broken references
  • richer preflight quality reports with verdicts, findings, and estimated size/memory/style pressure
  • render-plan inspection via SpreadsheetEngine.plan(...)
  • render-time metrics via SpreadsheetEngine.renderWithMetrics(...)
  • streamed ZIP output via SpreadsheetEngine.renderStream(...)
  • template parsing and inspection via SpreadsheetEngine.parseTemplate(...) and SpreadsheetEngine.inspectTemplate(...)
  • clean-template assembly via SpreadsheetEngine.assembleFromTemplate(...)
  • streamed template assembly output via SpreadsheetEngine.assembleFromTemplateStream(...)
  • token-aware formula row shifting via shiftFormulaRows(...) and offsetFormulaRows(...)
  • single-row named-range expansion for clean templates, including formula-bearing template rows
  • multiple distinct row-expansion anchors on the same sheet
  • table-aware template row expansion for existing template table ranges
import { SpreadsheetEngine } from "@paperjsx/json-to-xlsx";

const buffer = await SpreadsheetEngine.render({
  meta: {
    title: "Revenue Report",
    creator: "PaperJSX",
  },
  sheets: [
    {
      name: "Revenue",
      rows: [
        {
          cells: [
            { value: "Quarter" },
            { value: "Revenue" },
            { value: "Closed" },
            { value: "As Of" },
          ],
        },
        {
          cells: [
            { value: "Q1 2026" },
            { value: 420000 },
            { value: true },
            { value: new Date("2026-03-31T00:00:00.000Z") },
          ],
        },
      ],
    },
  ],
});

If you want pure AST validation before rendering, use SpreadsheetEngine.validateDocument(...) or validateSpreadsheetDocument(...). If you have already validated a document and want to skip repeating schema validation on a hot path, use SpreadsheetEngine.renderValidated(validatedDocument).

For Phase 4 and Phase 5 workflows, SpreadsheetEngine.preflight(...) now returns a richer quality report with verdict, findings, render recommendation, and projected size/memory/style pressure; SpreadsheetEngine.plan(...) returns staged part and sheet planning metadata; SpreadsheetEngine.renderWithMetrics(...) returns the output buffer plus chunk, part, and timing metrics; SpreadsheetEngine.renderStream(...) returns a real streamed ZIP output path for large-workbook delivery; SpreadsheetEngine.validate(buffer) inspects finished workbooks; SpreadsheetEngine.repair(buffer) applies conservative package repairs; SpreadsheetEngine.validateAndRepair(buffer) performs validate-repair-revalidate orchestration; SpreadsheetEngine.parseTemplate(...) / SpreadsheetEngine.inspectTemplate(...) expose template inventories and sanitization reports for existing workbooks; SpreadsheetEngine.render(...) can author native Excel tables through sheet-level tables; and SpreadsheetEngine.assembleFromTemplate(...) / SpreadsheetEngine.assembleFromTemplateStream(...) support clean-template named-range/direct-cell injection plus same-sheet row expansion across multiple distinct single-row anchors, including formula-bearing template rows and table-ref shifting for existing template tables. Those same validation and repair entry points now back the MCP spreadsheet tools in /Users/jake/plain/theplainworks/paperjsx.com/packages/mcp-server.

Notes

Local Tooling

  • pnpm --filter @paperjsx/json-to-xlsx validate:fixtures
  • pnpm --filter @paperjsx/json-to-xlsx validate:fixtures:large
  • pnpm --filter @paperjsx/json-to-xlsx export:fixtures
  • pnpm --filter @paperjsx/json-to-xlsx export:fixtures:large
  • pnpm --filter @paperjsx/json-to-xlsx benchmark:phase1 -- --iterations 2
  • pnpm --filter @paperjsx/json-to-xlsx benchmark:phase2 -- --iterations 1
  • pnpm --filter @paperjsx/json-to-xlsx benchmark:rigorous
  • pnpm --filter @paperjsx/json-to-xlsx chaos:run