Add empty columns to tabletools?

Add empty columns to tabletools?

newbie455newbie455 Posts: 1Questions: 1Answers: 0
edited August 2014 in Free community support

I've created a copy button with table tools that copies 3 columns from from a DataTable. Everything works great, but I need to add another button that copies the data in a certain format. The only difference is that the other format will add 3 blank columns, or tab characters after the first column. What is the easiest way to do this? I tried the below callback, but it did not work because dataTools seems to trim whitespace from the exported cells

"fnCellRender": function(sValue, iColumn, nTr, iDataIndex) {
// Append tabs to column 2
if (iColumn === 2) {
return sValue + "\t\t\t";
}
return sValue;
}

Does anyone know of a simple way I can make this work?

This discussion has been closed.