Handsontable example

HTML

<script src="https://cdn.jsdelivr.net/npm/handsontable@latest/dist/handsontable.full.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@latest/dist/handsontable.full.css">
<div id="example1" class="hot handsontable htRowHeaders htColumnHeaders"></div>

JavaScript

document.addEventListener("DOMContentLoaded", function() {

  var
    example = document.getElementById('example1'),
    hot1;

  hot1 = new Handsontable(example, {
    data: Handsontable.helper.createSpreadsheetData(13, 3),
    colHeaders: true,
    licenseKey: 'non-commercial-and-evaluation', //for non-commercial use only
    manualColumnResize: true,
    modifyColWidth: function(width, col){
      if(width > 150){
      	return 100
      }
    }
  });


});