How can I exclude the first column from being exported?
How can I exclude the first column from being exported?
Andreas85
Posts: 12Questions: 0Answers: 0
The first column in my tables contain some control buttons (edit, delete, change status). So I don't want to export them.
So can I skip that one somehow?
And also, some of my cells contain commas.
(Matrix M650 SK (2,3) JTD 43 H 130 HP)
So excel interprets that as the beginning of a new cell.
How can I fix that?
Thanks for a great product.
So can I skip that one somehow?
And also, some of my cells contain commas.
(Matrix M650 SK (2,3) JTD 43 H 130 HP)
So excel interprets that as the beginning of a new cell.
How can I fix that?
Thanks for a great product.
This discussion has been closed.
Replies
Allan
I tried putting an alert in the fnCellRender function but it never pops up.
Am I doing something wrong? Same thing with mColumns.
Allan
[code]
$(document).ready( function () {
$('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sExtends": "xls",
"sButtonText": "Hello world",
"sSwfPath": "<?=base_url()?>verkstad/lib/TableTools/media/swf/copy_csv_xls.swf",
"fnCellRender": function ( sValue, iColumn ) {
alert('asdas');
// Append the text 'TableTools' to column 5
if ( iColumn === 5 ) {
return sValue +" TableTools";
}
return sValue;
}
}
});
});
[/code]
I don't get any error messages. Exporting to xls works fine, but I don't get the alert
Allan