I have a working jQuery DataTable (https://www.datatables.net/) using the TableTools plug-in with <span>
elements in every row of one of the columns.
On clicking the export button, I would like to hide/remove the <span>
elements from the exported file. Not remove the whole columns, but just the <span>
elements within that column.
How can I achieve this? I understand how to remove an entire column from the export, but I have not found a way to remove particular elements from the export.
Thanks
UPDATED
"oTableTools": {
"sSwfPath": "/public/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "print",
},
{
"sExtends": "copy",
},
{
"sExtends": "csv",
"fnCellRender": function ( sValue, iColumn, nTr, iDataIndex ) {
return sValue;
}
}
]
}
I have the fnCellRender
in place, I'm just not sure what the best way is to strip out <span>
elements.