A web-based JavaScript(canvas) spreadsheet
Branch: master
Clone or download
Latest commit bd1f03b Feb 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets add + < > to svg Jan 28, 2019
dist update demo Feb 14, 2019
docs update demo Feb 14, 2019
src hide after click format Feb 15, 2019
test fixed #44 Feb 9, 2019
.babelrc first commit Sep 6, 2018
.eslintrc.js canvas table resizer Nov 5, 2018
.gitignore dist Jan 31, 2019
LICENSE add MIT LICENSE Jan 28, 2019
index.html rewrite border structure Feb 13, 2019
npmx.txt docs.. Jan 28, 2019
package-lock.json 1.0.5 Feb 14, 2019
package.json 1.0.5 Feb 14, 2019
readme.md add gitter to readme Feb 13, 2019
webpack.config.js canvas table resizer Nov 5, 2018
webpack.dev.js add viewport in index.html , host: 0.0.0.0 Jan 29, 2019
webpack.prod.js canvas table resizer Nov 5, 2018

readme.md

x-spreadsheet

npm package NPM downloads Join the chat at https://gitter.im/x-datav/spreadsheet

A web-based JavaScript spreadsheet

Install

npm install x-data-spreadsheet

Quick Start

<div id="x-spreadsheet-demo"></div>
import Spreadsheet from "x-data-spreadsheet";
// If you need to override the default options, you can set the override
// const options = {};
// new Spreadsheet('#x-spreadsheet-demo', options);
new Spreadsheet("#x-spreadsheet-demo")
  .loadData({}) // load data
  .change(data => {
    // save data to db
  });
// default options
{
  view: {
    height: () => document.documentElement.clientHeight - 41,
    width: () => document.documentElement.clientWidth,
  },
  formats: [],
  fonts: [],
  formula: [],
  row: {
    len: 100,
    height: 25,
  },
  col: {
    len: 26,
    width: 100,
    indexWidth: 60,
    minWidth: 60,
  },
  style: {
    bgcolor: '#ffffff',
    align: 'left',
    valign: 'middle',
    textwrap: false,
    textDecoration: 'normal',
    strikethrough: false,
    underline: false,
    color: '#0a0a0a',
    font: {
      name: 'Helvetica',
      size: 10,
      bold: false,
      italic: false,
    },
  },
}

Development

git clone https://github.com/myliang/x-spreadsheet.git
cd x-spreadsheet
npm install
npm run dev

Open your browser and visit http://127.0.0.1:8080.

Browser Support

Modern browsers(chrome, firefox, Safari).

LICENSE

MIT