tui.grid icon indicating copy to clipboard operation
tui.grid copied to clipboard

Export of Excel not working.

Open leedavi opened this issue 10 months ago • 1 comments

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');
                            },
                        },
                    ],
                },
            ],
        ],
    });

leedavi avatar Mar 09 '25 05:03 leedavi

Change over

blackcomb777 avatar Apr 17 '25 06:04 blackcomb777