Handsontable example

HTML

<div id="example1" class="hot handsontable htColumnHeaders"></div>

CSS

</style>< !-- Ugly Hack due to jsFiddle issue --><script src="https://docs.handsontable.com/pro/5.0.0/components/handsontable-pro/dist/handsontable.full.min.js"></script><link type="text/css" rel="stylesheet" href="https://docs.handsontable.com/pro/5.0.0/components/handsontable-pro/dist/handsontable.full.min.css"><script src="https://docs.handsontable.com/pro/5.0.0/components/numbro/dist/languages.min.js"></script>

JavaScript

var
  container = document.getElementById('example1'),
  hot;
var reg = /^\d+$/;
hot = new Handsontable(container, {
  data: [
    [1, 2],
    [3, 4]
  ],
  colHeaders: true,
  beforeKeyDown: function(e) {
    let row = this.getSelectedLast()[0];
    let col = this.getSelectedLast()[1];
    if (row === 0 && col === 0) {
      if (!reg.test(e.key)) {
        e.preventDefault()
      }
    }

  }
});