Handsontable example
HTML
<div id="example1" class="hot handsontable htColumnHeaders"></div>
CSS
</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"><script src="https://handsontable.com/docs/6.2.0/components/numbro/dist/languages.min.js"></script>
JavaScript
function getCarData() {
return [{
car: "Mercedes A 160",
year: 2017,
price_usd: 750.55
}];
}
var
container = document.getElementById('example1'),
hot;
hot = new Handsontable(container, {
data: getCarData(),
colHeaders: ['Car', 'Year', 'Price ($)', 'Price (€)'],
columnSorting: true,
columns: [{
data: 'price_usd',
type: 'numeric',
numericFormat: {
pattern: 'mantissa',
}
}, ]
});