Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

How to download the excel file without adding to DOM? #182

Open
TheInvoker opened this issue Jul 26, 2019 · 0 comments
Open

How to download the excel file without adding to DOM? #182

TheInvoker opened this issue Jul 26, 2019 · 0 comments

Comments

@TheInvoker
Copy link

I'm using this right now to force the download automatically. How can I do this in the more cleaner intended way? (because it feels like a hack right now)

        exportToExcel : function(table, filename, sheetname) {
            var g = $(table).hide();
            $("body").append(g);
            $(g).tableExport({
                filename: filename,
                formats: ["xlsx"],
                sheetname : sheetname
            });
            g.find("caption button").click();
            g.remove();
        },
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant