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

sheetah

v0.3.4

Published

A Node.js excel export library using sheetah.io

Readme

Sheetah Node.js SDK

Sheetah Landing Page

Sheetah is a Node.js library that streamlines the process of exporting Excel files. With the sheetah.io service, you can generate Excel files from your data and templates fast and effortlessly.

Installation

Install Sheetah using npm:

npm install sheetah

Getting Started

First, obtain your API key from the Developer Settings Page. Then use the following code to initialize Sheetah:

Developer Settings Screenshot

const Sheetah = require("sheetah");

const API_KEY = "YOUR_API_KEY";
const sheetah = new Sheetah(API_KEY);

Usage

Follow these steps to export an Excel file using Sheetah:

Step 1: Generation

1.1. Setting the Template ID

Specify the template by using setTemplateId method:

sheetah.setTemplateId(35);

1.2. Setting the Tables

Add tables with the setTables method:

sheetah.setTables([
  {
    id: "table1",
    columns: [
      { name: "Column 1", filter: false, totalFormula: "none" },
      { name: "Column 2", filter: true, totalFormula: "average" },
    ],
    rows: [
      ["Row 1", "Data"],
      ["Row 2", "More Data"],
    ],
  },
]);

Table settings must be completed on the Template Settings Page.

Table Settings

Table Settings GIF

1.3. Setting Variables

Use the setVariables method to add dynamic data. This is useful for dynamic data insertion:

sheetah.setVariables({
  user: "Dave",
  email: "[email protected]",
  year: "2019",
  month: "08",
});

Template Variables

1.4. Setting Sheets

Use the setSheets method to add sheets:

sheetah.setSheets([
  {
    id: 1,
    name: "Budget",
    directData: {
      A1: "This is cell A1 on Budget sheet",
    },
  },
  {
    id: 2,
    name: "Expenses",
    directData: {
      B2: "This is cell B2 on Expenses sheet",
    },
  },
]);

1.5. Setting Options

With setOptions you can specify filename, password, and expiration days:

sheetah.setOptions({
  filename: "Survey Results",
  password: "mypassword",
  expireInDays: 7,
});

Step 2: Export

2.1. Export to File URL

Export your file to a downloadable URL with exportExcelToFileUrl method:

(async () => {
  const result = await sheetah.exportExcelToFileUrl();

  if (result.message === "success") {
    console.log("Download URL:", result.fileUrl);
  } else {
    console.log("Download Failed:", result.message);
  }
})();

2.2. Export to Buffer

Alternatively, you can also export the sheet and get it as a byte array using exportExcelToBuffer method:

(async () => {
  const result = await sheetah.exportExcelToBuffer();

  if (result.buffer) {
    // Do something with result.buffer
  }
})();

2.3. Export to File

Lastly, you can also save the exported sheet as a local file:

(async () => {
  const result = await sheetah.exportExcelToFile("/path/to/file.xlsx");

  if (result.file) {
    console.log("Downloaded file =", result.file);
  }
})();

Contributing

Contributions are welcomed. If you are interested, please fork the repository and make your changes. A detailed description of your changes when making a PR is appreciated.

License

This project is licensed under the MIT License.

_Note: Don't forget to replace 'YOUR_API_KEY' with your actual API key when using the library.