Handsontable example

by oo7_sakshi

HTML

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

CSS

</style><!-- Ugly Hack due to jsFiddle issue -->

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

JavaScript

var
    container = document.getElementById('example1'),
    hot;
  
  hot = new Handsontable(container, {
    data: Handsontable.helper.createSpreadsheetData(100, 18),
    colWidths: [47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47],
    rowHeaders: true,
    colHeaders: true,
    contextMenu: true,
    mergeCells: [
      {row: 1, col: 1, rowspan: 3, colspan: 3},
      {row:2, col: 1, rowspan: 3, colspan: 3},
      {row: 3, col: 4, rowspan: 2, colspan: 2},
      {row: 5, col: 6, rowspan: 3, colspan: 3}
    ]
  });