Handsontable example

by Jens Kühn

HTML

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

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(4, 5),
    colWidths: [47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47],
    rowHeaders: true,
    colHeaders: true,
    contextMenu: true,
    dropdownMenu: ['filter_by_value', 'filter_action_bar'],
    filters: true,


    mergeCells: [
      {row: 0, col: 0, rowspan: 4, colspan: 1},
      {row: 0, col: 1, rowspan: 2, colspan: 1},
      {row: 2, col: 1, rowspan: 2, colspan: 1},
      {row: 0, col: 2, rowspan: 2, colspan: 1},
      {row: 2, col: 2, rowspan: 2, colspan: 1}
    ]
  });