JSFiddle - React, Tailwind, and code Playground

by sbaudh

HTML

<script src="https://cdn.jsdelivr.net/npm/handsontable@11.1/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@11.1/dist/handsontable.full.min.css" /> 

<div id="example5" class="hot "></div>

JavaScript

const container = document.getElementById('example5');
const hyperformulaInstance = HyperFormula.buildEmpty({
  // to use an external HyperFormula instance,
  // initialize it with the `'internal-use-in-handsontable'` license key
  licenseKey: 'internal-use-in-handsontable',
});
const data = [
  { id:1,address: '=A2+A3' },
  { id: 2, address: '' }, // HOT will create missing properties on demand
  { id: 3, name: {first: 'Joan', last: 'Well'}, address: '' }
];

const hot = new Handsontable(container, {
  data,
  dataSchema: { id: null, name: { first: null, last: null }, address: null },
  colHeaders: true,
  height: 'auto',
  width: 'auto',
  columns: [
    { data: 'id' },
    { data: 'name.first' },
    { data: 'name.last' },
    { data: 'address' }
  ],
 formulas: {
    engine: hyperformulaInstance,
  },
  minSpareRows: 1,
  licenseKey: 'non-commercial-and-evaluation'
});