Answer the question
In order to leave comments, you need to log in
How to export DataTables to Excel without rounding numbers?
Hello!
How to export DataTables to Excel without rounding numbers?
With the standard export method using the Excel button in a table built using DataTables, everything is exported normally except for type data: 8762348732.6723543625, all data is rounded. How to disable rounding, is there a way to bypass this rounding?
Thank you.
Answer the question
In order to leave comments, you need to log in
export it to csv and already it to excel
ps there are export settings there , you can play with the customizeData method if you return data like this param=''+param;
The solution to the issue may be to use the format when exporting, for example like this:
{
extend: 'excelHtml5',
exportOptions: {
format: {
body: function ( data, row, column, node ) {
//используйте data или node для отображения данных и их преобразования в нужный формат
//Пример: $(node).find('data').prevObject[0].innerHTML
return ...;
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question