Export data with Javascript?
Export data with Javascript?
tjohnson
Posts: 2Questions: 1Answers: 0
Is there a way to call the DataTables export function (Excel, CSV, Copy to clipboard) from Javascript instead of using the buttons?
This discussion has been closed.
Answers
You can use the
button().trigger()
API method for the Buttons to trigger their actions.Worth noting that not all browsers will allow a file to be created and downloaded if it isn't triggered by a user action.
Allan
Thanks, that's really helpful!