tui.grid
tui.grid copied to clipboard
Export of Excel not working.
I have the grid working and the CSV export does works, but the excel export does not work.
Has anyone any idea what I am doing wrong?
Here is the js:
<link rel="stylesheet" href="/tui-grid.min.css" />
<script src="/tui-grid.min.js"></script>
<script src="/xlsx.full.min.js"></script>
Here is the code:
$(document).ready(function () {
const grid = new tui.Grid({
el: document.getElementById('grid'),
data: dataGrid,
scrollX: false,
scrollY: false,
columns: columnData,
contextMenu: ({ rowKey, columnName }) => [
[
{
name: 'export',
label: 'Export',
subMenu: [
{
name: 'csvExport',
label: 'CSV export',
action: () => {
grid.export('csv');
},
},
{
name: 'excelExport',
label: 'Excel export(xlsx)',
action: () => {
grid.export('xlsx');
},
},
{
name: 'excelExport',
label: 'Excel export(xls)',
action: () => {
grid.export('xls');
},
},
],
},
],
],
});
Change over