Handsontable example

HTML

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

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

JavaScript

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

let optionM = []

for(i=0; i<500; i++){
	optionM.push({"row":i*2,"col":0,"rowspan":2,"colspan":1})
  optionM.push({"row":i*2,"col":1,"rowspan":2,"colspan":1})
  optionM.push({"row":i*2,"col":2,"rowspan":2,"colspan":1})
  optionM.push({"row":i*2,"col":3,"rowspan":2,"colspan":1})
  optionM.push({"row":i*2,"col":4,"rowspan":2,"colspan":1})
  optionM.push({"row":i*2,"col":23,"rowspan":2,"colspan":1})
  optionM.push({"row":i*2,"col":24,"rowspan":2,"colspan":1})
}

const hot = new Handsontable(container, {
  data: Handsontable.helper.createSpreadsheetData(1000, 25),
  height: 320,
  colWidths: 47,
  rowHeaders: true,
  colHeaders: true,
  contextMenu: true,
  mergeCells: optionM,
  licenseKey: 'non-commercial-and-evaluation'
});