Handsontable example

by handsoncode

HTML

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

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

CSS

.handsontable .newColor {
   background-color: yellow;
}

JavaScript

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

const hot = new Handsontable(container, {
  data: Handsontable.helper.createSpreadsheetData(5, 5),
  colHeaders: true,
  rowHeaders: true,
  height: 'auto',
  licenseKey: 'non-commercial-and-evaluation',
  afterGetColHeader: function(column, TH) {
    if (column === 0) {
    	TH.innerHTML = '<a href="https:/google.com/" target="_blank">Some Link</a>'
    }
  },
});