Handsontable example

by Blake Gilchrist

HTML

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/handsontable.full.min.css" /> 
<script src="https://handsontable.com/docs/14.1/scripts/fixer.js"></script>

<div id="example-data-grid" class="hot "></div>

Babel + JSX

import Handsontable from 'handsontable';
import HyperFormula from 'hyperformula';
import 'handsontable/dist/handsontable.full.min.css';

const dataa = Handsontable.helper.createSpreadsheetData(10, 50)

const container = document.querySelector('#example-data-grid');
const hot = new Handsontable(container, {
  data: dataa,
  formulas: {
    engine: HyperFormula,
  },
  colHeaders: ['Qty', 'Unit price', 'Discount', 'Freight', 'Total due (fx)'],
  stretchH: 'all',
  height: 500,
  minRows: 100,
  rowHeaders: true,
  licenseKey: 'non-commercial-and-evaluation',
});