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

gridjs-spreadsheet

v26.7.0

Published

this is the client side script for GridJs which is a lightweight, scalable, and customizable toolkit that provides cross-platform web applications, enables convenient development for editing or viewing Excel/Spreadsheet files, offers simple deployment, an

Readme

gridjs-spreadsheet

gridjs-spreadsheet is the browser-side spreadsheet UI for Aspose.Cells GridJs. The package includes the core GridJS runtime, TypeScript declarations, and adapters for React, Vue 3, and Angular.

Version 26.7.0 also publishes a complete Java example containing five independent frontend demos:

  • React
  • Vue 3
  • Angular
  • Vanilla HTML using npm imports
  • Vanilla HTML using CDN script tags

Installation

npm install gridjs-spreadsheet

The framework packages are optional peer dependencies. Install only the framework used by your application.

Package exports

| Usage | Import | | --- | --- | | Core runtime | gridjs-spreadsheet | | Styles | gridjs-spreadsheet/xspreadsheet.css | | React | gridjs-spreadsheet/react | | Vue 3 | gridjs-spreadsheet/vue | | Angular | gridjs-spreadsheet/angular | | Shared adapter | gridjs-spreadsheet/shared |

Vanilla JavaScript with npm

<div id="gridjs-demo"></div>
import Spreadsheet from 'gridjs-spreadsheet';
import JSZip from 'jszip';
import 'gridjs-spreadsheet/xspreadsheet.css';

window.JSZip = JSZip;

const spreadsheet = new Spreadsheet('#gridjs-demo', {
  updateMode: 'server',
  updateUrl: '/GridJs2/UpdateCell',
  mode: 'edit',
  local: 'en',
});

spreadsheet.loadData(workbookJson.data, workbookJson.actname);
spreadsheet.setUniqueId(workbookJson.uniqueid);
spreadsheet.setFileName(workbookJson.filename);

Vanilla HTML with script tags

<link
  rel="stylesheet"
  href="https://unpkg.com/[email protected]/xspreadsheet.css"
>

<script src="https://unpkg.com/[email protected]/dist/jszip.min.js"></script>
<script src="https://unpkg.com/[email protected]/xspreadsheet.js"></script>

<div id="gridjs-demo"></div>

<script>
  const spreadsheet = x_spreadsheet('#gridjs-demo', {
    updateMode: 'server',
    updateUrl: '/GridJs2/UpdateCell',
    mode: 'edit',
    local: 'en',
  });

  spreadsheet.loadData(workbookJson.data, workbookJson.actname);
</script>

React

import { useState } from 'react';
import { GridJsSpreadsheet } from 'gridjs-spreadsheet/react';
import 'gridjs-spreadsheet/xspreadsheet.css';

export default function App() {
  const [data] = useState(null);

  return (
    <GridJsSpreadsheet
      data={data}
      apiBase=""
      mode="edit"
      locale="en"
      height="600px"
      onReady={(instance, adapter) => console.log('ready', instance, adapter)}
      onError={(error) => console.error(error)}
    />
  );
}

Vue 3

<template>
  <GridJsSpreadsheet
    :data="sheetData"
    mode="edit"
    locale="en"
    height="600px"
    @ready="onReady"
    @error="onError"
  />
</template>

<script setup>
import { ref } from 'vue';
import { GridJsSpreadsheet } from 'gridjs-spreadsheet/vue';
import 'gridjs-spreadsheet/xspreadsheet.css';

const sheetData = ref(null);
const onReady = (instance, adapter) => console.log('ready', instance, adapter);
const onError = error => console.error(error);
</script>

Angular

import { Component } from '@angular/core';
import { GridJsSpreadsheetComponent } from 'gridjs-spreadsheet/angular';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [GridJsSpreadsheetComponent],
  template: `
    <gridjs-spreadsheet
      [data]="sheetData"
      mode="edit"
      locale="en"
      height="600px"
      (ready)="onReady($event)"
      (error)="onError($event)"
    />
  `,
})
export class AppComponent {
  sheetData: any = null;
  onReady(event: any) { console.log('ready', event); }
  onError(error: any) { console.error(error); }
}

Add the GridJS stylesheet to angular.json:

"styles": [
  "node_modules/gridjs-spreadsheet/xspreadsheet.css",
  "src/styles.css"
]

Framework adapter inputs

The React, Vue, and Angular adapters share the same configuration model:

| Option | Description | | --- | --- | | apiBase | Optional prefix for GridJS backend endpoints | | data | Workbook JSON returned by the GridJS backend | | loader | Function that asynchronously returns workbook JSON | | mode | edit or read | | locale | GridJS UI locale | | token | Optional authorization token | | height | Component height | | showToolbar | Show or hide the toolbar | | showContextmenu | Show or hide the context menu |

The adapters expose ready, change, error, cell selection, cell editing, sheet selection, and sheet loading events using each framework's normal event conventions.

GridJS requires a browser DOM. Mount the adapters on the client when using an SSR framework.

Java example included in the package

The published package contains example/, including a Spring Boot backend and all five frontend projects. Copy it to a writable directory before running it:

npm install gridjs-spreadsheet
cp -R node_modules/gridjs-spreadsheet/example ./gridjs-example
cd gridjs-example

Start the Java backend in the first terminal:

./mvnw spring-boot:run -Dmaven.test.skip=true

Start a frontend in a second terminal, for example React:

cd react-gridjs
npm install
npm run dev

See example/README.md for all framework commands, ports, backend configuration, and troubleshooting.

Backend endpoints

The adapters use the standard Aspose.Cells GridJs endpoints, including:

  • /GridJs2/UpdateCell
  • /GridJs2/ImageUrl
  • /GridJs2/AddImage
  • /GridJs2/AddImageByURL
  • /GridJs2/CopyImage
  • /GridJs2/Download
  • /GridJs2/Ole
  • /GridJs2/LazyLoadingStreamJson

The example frontend development servers proxy /GridJs2 and /gridjsdemo to the Java backend on port 8080.

Preview

Resources

License

MIT