Handsontable example
HTML
<div>
<div id="example1" class="hot handsontable htRowHeaders htColumnHeaders"></div>
</div>
CSS
</style><!-- Ugly Hack due to jsFiddle issue --> <script src="https://docs.handsontable.com/pro/1.5.1/bower_components/handsontable-pro/dist/handsontable.full.min.js"></script> <link type="text/css" rel="stylesheet" href="https://docs.handsontable.com/pro/1.5.1/bower_components/handsontable-pro/dist/handsontable.full.min.css">
JavaScript
document.addEventListener("DOMContentLoaded", function() {
var example1 = document.getElementById('example1');
var hot = new Handsontable(example1, {
data: Handsontable.helper.createSpreadsheetData(5, 40),
colHeaders: true,
rowHeaders: true,
viewportColumnRenderingOffset: 40,
nestedHeaders: [
[{
label: 'A',
colspan: 5
}, {
label: 'B',
colspan: 5
}, {
label: 'C',
colspan: 5
}, {
label: 'D',
colspan: 5
}, {
label: 'E',
colspan: 5
}, {
label: 'F',
colspan: 5
}, {
label: 'G',
colspan: 5
}, {
label: 'H',
colspan: 5
}],
[
'A1', 'A2', 'A3', 'A4', 'A5',
'B1', 'B2', 'B3', 'B4', 'B5',
'C1', 'C2', 'C3', 'C4', 'C5',
'D1', 'D2', 'D3', 'D4', 'D5',
'E1', 'E2', 'E3', 'E4', 'E5',
'F1', 'F2', 'F3', 'F4', 'F5',
'G1', 'G2', 'G3', 'G4', 'G5',
'H1', 'H2', 'H3', 'H4', 'H5'
]
]
});
});