High performance javascript spreadsheets library

Show tabular data to your users and let them edit it. This package is very small and short enough that you might consider just modifying its source to add the features you need for your use case.

Usage

If you're using a bundler, run npm install nanosheets then import it with import {NanoSheets} from "nanosheets". You can also pull the library from jsdeliver .

Simple data model

This example show how data is saved. It's a simple object with cell coordinates as keys and cell content as value. Cells can only contain string value.

Side by side synchronized editors

See changes on the left reflected on the right side. This just uses the same object for both editor's data, and lets them know when to redraw.

Read only

You can initialize the sheet with readOnly:true, or update it later by setting the instance readOnly property.

Large datasets

Nanosheets can easily display and edit large datasets. Below is a 100 000 cells dataset (100x1000). The scroll area adjusts to the current data. There's no penalty for having empty space between the defined values in your dataset, as the cells are accessed as keys of an object.

Create and destroy

to create and then cleaned up an instance with instance.destroy().

Select cells programmatically

to change the selection wiht the instance.select(x,y) method.

Custom styling

There are a few parameters you can change. If that's not enough, you can add css rules, or change the source directly.

Selection tracking

License

This lib is MIT licensed, do what you want with it. Don't expect free support and bugfixes though.

GitHub