Intrasheets

Intrasheets is the Excel experience as a library: ribbon, formula bar, sheet tabs, backstage, charts, pivot tables, comments and XLSX import and export, built on Jspreadsheet and its extensions. This workbook lives on Jspreadsheet Server and is shared with every visitor of this page: open it in a second window and watch the changes travel in real time.


How it works

  • npm install intrasheets, or one script tag, gives the whole application: intrasheets.load(element, { guid, width, height }).
  • The document is a Jspreadsheet Server document: the server persists it, authenticates every request and broadcasts every change to the other users.
  • Sizes, events and the user's token belong to the host application, so intrasheets fits inside an existing product.
  • Without a server, the offline mode runs the same interface on a workbook that lives in the browser.

Install Intrasheets

Start offline, with nothing but the library, then connect it to Jspreadsheet Server for real-time collaboration.

1. Try it on StackBlitz

Open a ready-made Vite project with Intrasheets in offline mode. Nothing to install and no account needed: the project runs in your browser with a license valid for one day.


2. Add it to your project

Install the package and import the library and its stylesheet:

npm install intrasheets
import intrasheets from 'intrasheets';
import 'intrasheets/dist/style.css';

Prefer a script tag? The CDN build is self-contained and exposes the global intrasheets:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intrasheets@6/dist/style.css" />
<script src="https://cdn.jsdelivr.net/npm/intrasheets@6/dist/index.min.js"></script>

3. Render a workbook offline

Configure the library once with your license, then render a workbook into any element. In offline mode, spreadsheet takes the regular jspreadsheet() options in place of a document id:

<div id="root"></div>

<script>
intrasheets({ license: 'your-license', offline: true });

intrasheets.load(document.getElementById('root'), {
    name: 'Quarterly sales',
    height: 600,
    spreadsheet: {
        worksheets: [{
            data: [
                ['Keyboards', 12400, 13900, '=SUM(B1:C1)'],
                ['Monitors', 48200, 45100, '=SUM(B2:C2)'],
            ],
        }],
        onchange: function(worksheet, cell, x, y, value) {
            // Every Jspreadsheet event reaches your code
        },
    },
});
</script>
  • Saving is exporting: Save, Ctrl+S and File > Export produce XLSX, PDF or CSV.
  • File > Open and Data > Get Data load an XLSX or CSV file picked by the user. Pass onopen(config, fileName) to load to receive it and send it to your back end.
  • The document list, autosave, Insert > Form and the AI assistant need the server.

Get your license at jspreadsheet.com/me. A free trial is available.

4. Connect to Jspreadsheet Server

For shared documents and real-time collaboration, point the library to your server and pass the user's token. Each document is opened by its id:

intrasheets({
    license: 'your-license',
    client: { url: 'https://your-server', token: userToken },
});

intrasheets.load(document.getElementById('root'), { guid: documentId, width: 1200, height: 800 });

The fastest way to get a server running is the reference application: a React front end, the server and MongoDB in Docker, built only from published packages.

git clone https://github.com/intrasheets/demo.git intrasheets-demo
cd intrasheets-demo
cp .env.example .env      # your Jspreadsheet client id and license key
docker compose up

Open http://localhost:5173, sign in with any email and create a blank workbook. Open the same address in a private window with another email and edit both: the changes travel in real time. The README explains each step, how to verify the server with curl, and where to plug in your own login and database.

Next steps