Handsontable example

by handsoncode

HTML

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.css">
<script src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"></script>
<div id="example" class="hot head-gap handsontable htRowHeaders htColumnHeaders"></div>

CSS

body {
  background: white;
  margin: 0;
  padding: 0;
}

JavaScript

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

  var
    example = document.getElementById('example'),
    hot;

  hot = new Handsontable(example, {
    data: Handsontable.helper.createSpreadsheetData(20, 7),
    colWidths: 107,
    width: 620,
    colHeaders: true,
    contextMenu: true,
    dropdownMenu: true,
    filters: true,
    licenseKey: 'non-commercial-and-evaluation',
  });



});