HoT - Row add/remove operations formulas
by Blake Gilchrist
HTML
<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" />
<script src="https://handsontable.com/docs/scripts/fixer.js"></script>
<h3 class="demo-preview">HoT - Row add/remove operations and effects on formulas</h3>
<div id="example-basic-multi-sheet-1"></div>
SCSS
h3.demo-preview {
margin-bottom: 0.3rem !important;
padding-top: 0 !important;
margin-top: 0.5rem !important;
}
Babel + JSX
import Handsontable from 'handsontable';
import HyperFormula from 'hyperformula';
import 'handsontable/dist/handsontable.full.min.css';
const data1 = [
['Item 1', '10'],
['Item 2', '50'],
['Item 3', '100'],
['Totals', '=SUM(B1:B3)'],
];
// create an external HyperFormula instance
const hyperformulaInstance = HyperFormula.buildEmpty({
// to use an external HyperFormula instance,
// initialize it with the `'internal-use-in-handsontable'` license key
licenseKey: 'internal-use-in-handsontable',
});
const container1 = document.querySelector('#example-basic-multi-sheet-1');
new Handsontable(container1, {
data: data1,
colHeaders: true,
rowHeaders: true,
height: 'auto',
formulas: {
engine: hyperformulaInstance,
sheetName: 'Sheet1',
},
autoWrapRow: true,
autoWrapCol: true,
contextMenu: true,
licenseKey: 'non-commercial-and-evaluation',
});