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

lmZzwjnQrq:749 Uncaught TypeError: datatable.exportable.toCSV is not a function #2

Open
kieranheadley opened this issue May 21, 2018 · 0 comments

Comments

@kieranheadley
Copy link

kieranheadley commented May 21, 2018

I am getting the error Uncaught TypeError: datatable.exportable.toCSV is not a function when trying to export a table using the CSV export option. The code that I am using is as below;

<script src="https://unpkg.com/vanilla-datatables@latest/dist/vanilla-dataTables.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/vanilla-datatables-exportable@latest/datatable.exportable.min.js" type="text/javascript"></script>
<script>
    var datatable = new DataTable("table", {
        exportable: {
            type:'csv',
            download:true,
            escapeHTML: true,
            includeHeadings: true
        }
    });

    $(document).on('click', '#csvExport', function(){
        datatable.exportable.toCSV();
    });
</script>
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