Export buttons - only export filtered data?
Export buttons - only export filtered data?
emf411
Posts: 5Questions: 2Answers: 1
I'm trying to figure out how to export only filtered rows in my DataTable but I can't seem to get the right combination of code to work.
This is my table
var table = $('#myTable').DataTable();
This is my filtered data
var visibleRows = $('#myTable tr:visible');
Can anyone help me with how to configure the Excel Export button to just export the "visibleRows"?
Thank you!!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I think by default export will export the data as filtered. If you want to export only the current page then you can add this export option to your button config:
Kevin
Thank you very much Kevin, that was exactly what I was looking for!