Handsontable example

by aszymanski

HTML

<div id="example1" class="hot handsontable htRowHeaders htColumnHeaders" style="height: 320px; overflow: hidden; width: 584px;" data-originalstyle="height: 320px; overflow: hidden; width: 584px;"></div>

CSS

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

JavaScript

var example = document.getElementById('example1');
var hot = new Handsontable(example, {
  data: Handsontable.helper.createSpreadsheetData(1, 6),
  rowHeaders: true,
  colHeaders: true,
  contextMenu: true,
  afterCreateRow: function(index, amount) {
     hot.setDataAtCell(index, 0, 'Sample', 'myOwnChange');
  }
});