$(document).ready(function () {
$.fn.dataTable.moment(lang == "en" ? 'DD/MM/YYYY' : 'DD.MM.YYYY');
categories_table = $('.datatable').DataTable({
order: [[1, 'desc']],
language: datatable_lang,
dom: 'Bfrtip',
buttons: [
{
extend: 'collection',
autoClose: 'true',
text: '<i class="download icon">',
tag: 'span',
buttons: ['csv', 'print', 'excel']
}
]
});
});
This gives nice looking format for price, like "8,00" as example. But when I export that to excel, I get "800" as value. And if number is "18,00", excel will show it as "1,800".
Is there any way to sort this out and have same values in excel as well? I try a lot thing but I didnt do it.
Thanks
easiest way is to remove comma from 8,00 then 800 will appear as number in excel, a number with comma is treated as text in excel