This is my values that I am getting in datatable.
Cuenta Nombre Cuenta Oct18 Dec18 Sep19 Oct19 M$ M% A$ A%
11 Activos Liquidos 5732,12 6950,89 5879,21 5965,02 85,82 1.4 232,91 4.06
When exporting the excel the data's decimal place gets converted to 5732.12 6950.89 ..etc. I need to preserve the decimal I am using datatables.
I used this code:
{
extend: 'excel',
exportOptions: {
columns: ':visible',
format: {
body: function(data, row, column, node) {
data = $('<p>' + data + '</p>').text();
return $.isNumeric(data.replace(',', '.')) ? data.replace(',', '.') : data;
}
}
}
}
But it changes my 4.06 to 4,06 which is incorrect. How to achieve this? Thank you.
Update :
This is the value I am getting in excel
' + data + '
').text();` – mplungjan Jun 10 '20 at 10:52