How can I make a number as text
How can I make a number as text
pantho2k2
Posts: 3Questions: 2Answers: 1
I'm trying to make a number as text in datatables.js. If I do it manually in the excel file it works.. but when I do that programmatically it doesn't.. where I'm doing wrong.
{
"data": "ProductCode", "title": 'Product Code', "visible": true, responsivePriority: 1, render: function (data, type, row) {
if (type === 'export') {
return "'" + data;
}
else {
return data;
}
}
},
This is my button declaration
// Initialize Download Button
new $.fn.dataTable.Buttons(table, {
buttons: [{
extend: 'excel', text: 'Download Excel', className: 'btn-sm btn-success downloadButton', exportOptions: {
columns: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],
orthogonal: 'export'
}
}]
});
This discussion has been closed.