Babel + JSX
import Handsontable from 'handsontable';
import 'handsontable/styles/handsontable.css';
import 'handsontable/styles/ht-theme-main.css';
// generate an array of arrays with dummy data
const container = document.querySelector('#example2');
new Handsontable(container, {
data: [
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O'],
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O'],
['=B3+C3', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'K', 'L', 'M', 'N', 'O'],
],
themeName: 'ht-theme-main',
formulas: {
engine: HyperFormula,
},
nestedHeaders: [
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O'],
['Dimension', 'Dimension', 'Dimension', 'Dimension', 'Taxes', 'Taxes', 'Taxes', 'Fees', 'Fees', 'Fees', 'Other costs', 'Other costs', 'Other costs', 'Other costs', 'Other costs'],
],
colWidths: 100,
width: '100%',
height: 320,
rowHeaders: true,
colHeaders: true,
fixedColumnsStart: 0,
contextMenu: true,
manualColumnFreeze: true,
autoWrapRow: true,
autoWrapCol: true,
licenseKey: 'non-commercial-and-evaluation',
});