Handsontable example
HTML
<link rel="stylesheet" href="https://docs.handsontable.com/pro/bower_components/handsontable-pro/dist/handsontable.full.min.css">
<script src="https://docs.handsontable.com/pro/bower_components/handsontable-pro/dist/handsontable.full.min.js"></script>
<div>
<div id="example1" class="hot handsontable htRowHeaders htColumnHeaders"></div>
</div>
CSS
body {
font: 0.8em Helvetica;
}
.handsontable thead TR:nth-child(1) {
font-size: 1.9em;
color: #009688 !important;
font-weight: bold;
}
.handsontable thead TR:nth-child(2) {
font-size: 1.7em;
text-align: left;
}
.handsontable thead TR:nth-child(3) {
font-size: 1.5em;
font-weight: bold;
text-align: right !important;
}
JavaScript
document.addEventListener("DOMContentLoaded", function() {
var example1 = document.getElementById('example1');
var hot = new Handsontable(example1, {
data: Handsontable.helper.createSpreadsheetData(5, 10),
colHeaders: true,
rowHeaders: true,
nestedHeaders: [
['A', {
label: 'B',
colspan: 8
}, 'C'],
['D', {
label: 'E',
colspan: 4
}, {
label: 'F',
colspan: 4
}, 'G'],
['H', {
label: 'I',
colspan: 2
}, {
label: 'J',
colspan: 2
}, {
label: 'K',
colspan: 2
}, {
label: 'L',
colspan: 2
}, 'M'],
['N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W']
]
});
});