Handsontable example
HTML
<script src="https://cdn.jsdelivr.net/npm/handsontable@13.1/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@13.1/dist/handsontable.full.min.css" />
<script src="https://handsontable.com/docs/scripts/fixer.js"></script>
<div id="example1" class="hot "></div>
Babel + JSX
import Handsontable from 'handsontable';
import 'handsontable/dist/handsontable.full.min.css';
// generate an array of arrays with dummy data
const data = new Array(1000) // number of rows
.fill()
.map((_, row) => new Array(500) // number of columns
.fill()
.map((_, column) => `${row}, ${column}`)
);
const container = document.querySelector('#example1');
const hot = new Handsontable(container, {
data,
height: 600,
colWidths: 47,
rowHeaders: true,
colHeaders: true,
contextMenu: true,
mergeCells: [
{ row: 1, col: 1, rowspan: 3, colspan: 400 },
{ row: 3, col: 4, rowspan: 2, colspan: 450 },
{ row: 5, col: 6, rowspan: 3, colspan: 480 }
],
licenseKey: 'non-commercial-and-evaluation'
});