Handsontable example
by galvakojis
HTML
<div>
<div id="example1" class="hot handsontable htRowHeaders htColumnHeaders"></div>
</div>
CSS
.handsontable thead th .relative {
clear: both;
}
.left {
float: left;
}
.handsontable thead th button.changeType {
float: right;
display: block;
}
.handsontable thead th span.colHeader {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
}
</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 example1 = document.getElementById('example1');
var hot = new Handsontable(example1, {
data: Handsontable.helper.createSpreadsheetData(5,10),
colHeaders: true,
rowHeaders: true,
dropdownMenu: ['filter_by_value', 'filter_by_condition' , 'filter_action_bar'],
filters: true,
columnSorting: true,
autoColSize: 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'],
['NNNNNNNNNNNN', 'OOOOOOOOOO', 'PPPPPP', 'QQQQQQQQQQQ', 'RRRRRRRRR', 'S', 'T', 'U', 'V', 'W']
]
});