How to change column name in export?
How to change column name in export?
Eitan
Posts: 3Questions: 2Answers: 0
I would like to change the name of the column "Severity" to "Severe" when exporting to CSV. Is there any way to do this?
Right now, my code looks like this:
opentable = $("#open").dataTable( {
dom: "Bfrtip",
"data": openData,
"columns": [{
data: "severity", render: function (data, type, row) {
if (type === 'export') {
return data;
} else {
return ...;
}
}],
"paging": true,
"searching": true,
buttons : [{
extend: 'csv',
exportOptions: {
columns: [0,1,2,3,4,5,6,7,8,9,10], orthogonal: 'export'
}
}]
});
This discussion has been closed.