Individual column input select exporting all options
Individual column input select exporting all options

I have filtered by table using Individual column input select in some footer columns. While exporting the table data to Print or Excel, all the dropdown data of those footer columns are also shown which is not required at all. Please suggest how to include the selected option only in exported data.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
This thread might help - it's doing something similar but for the header.
Colin
The said thread is simply hiding the column itself but in my case I want to have dropdown filter in select footer columns. I have enabled footer export for Print and Excel where all the dropdown options are shown as a long string instead of reflecting the selected option only. Please help..
Data exported while printing.
Sorry, attachment missed.
e-reporting.in/report_FCI.pdf
Please help @allan, I want to have dropdown filter in select footer columns. I have enabled footer export for Print and Excel where all the dropdown options are shown as a long string instead of reflecting the selected option only.
On this page, https://datatables.net/reference/button/pdfHtml5 , the first comment shows how to modify the footer. I haven't tried it, but it would be worth giving that a go.
Couldn't succeed...
Could you create a test case showing how far you've got - that would give us something to debug together.
Finally, succedded using the following code
oTable.on( 'order.dt search.dt', function () {
oTable.rows({search:'applied', order:'applied'}).every( function ( rowIdx, tableLoop, rowLoop ) {
var data = this.data();
data.Sr = rowLoop + 1;
/*Sr is your index column, don't use your primary key or id as it could create problem in editing or deleting */
this.data( data );
} );
} ).draw();