CSV export
CSV export
I have a editor page that shows 4 columns out of the 24 available in a table.
The editor modal allows for the update of all 24.
I have an EXPORT button, but it only exports a CSV with the 4 columns showing in the table.
How can I get the CSV export to show ALL rows AND all columns?
I am using the latest EDITOR inline example code.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Exporting all the columns should happen by default. See this example where two columns are hidden but all the columns are exported:
http://live.datatables.net/gajixemu/1/edit
Maybe you have configured specific columns as shown in this example:
https://datatables.net/extensions/buttons/examples/html5/columns.html
If this doesn't help then please post a link to your page or a test case replicating the issue so we can take a look.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Editor is independent of the Export buttons. They are part of Datatables.
Kevin
Thanks. I was able to control the output of columns using the following:
{ extend: 'csv', text: 'Export CSV', filename: 'myfile', exportOptions: {
columns: [ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 ]
} }