How do i ignore mRender column while exporing to excel
How do i ignore mRender column while exporing to excel
Hi Everyone,
I have binded my data table with json data from ASp.NET Webapi. i have rendered a two button for edit and delete as below, when i export to excel i want to ignore in my sheet. I'm using "excelHtml5" button
columns: [
{ data: 'firstName' },
{ data: 'lastName' },
{ data: 'gender' },
{ data: 'idNumber' },
{ data: 'idType' },
{
"mRender": function(data, type, row) {
return '
';
}
},
{
"mRender": function(data, type, row) {
var deleteMessage = 'Are you sure you want to delete the Proxy : ' + row.firstName + ' ?';
return '
';
}
}
This question has an accepted answers - jump to answer
Answers
If I understand correctly you want to export certain columns but not all. You can use column selectors as shown in this example:
https://datatables.net/extensions/buttons/examples/html5/columns.html
Kevin
@kthorngren perfect, this what i need