Handsontable example

HTML

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

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

JavaScript

const container = document.querySelector('#example1');

const hot = new Handsontable(container, {
  data: Handsontable.helper.createSpreadsheetData(4000, 20), //dummy data for tests
  rowHeaders: true,
  colHeaders: true,
  autoWrapRow: true,
  contextMenu: true,
  height: '200',
  stretchH: 'all',
  className: 'htCenter',
  licenseKey: 'non-commercial-and-evaluation',
  beforeChange: function(){
  	//add logic
  },
  afterChange: function(){
  	//add logic
  },
  afterCreateRow: function(){
  	//add logic
  },
  afterPaste: function(){
  	//add logic
  }
});