Datatable export to csv is not working properly, exported csv of the data table giving 7.15175E+14 i
Datatable export to csv is not working properly, exported csv of the data table giving 7.15175E+14 i
siddu_Biradar
Posts: 3Questions: 1Answers: 0
Datatable export to csv is not working properly, exported csv of the data table giving 7.15175E+14 instead of the 715175180000591
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @siddu_Biradar ,
That'll be Excel displaying it in scientific notation - if you format the column, it'll show the correct number.
Cheers,
Colin
Hi Colin,
Thanks for your input, But I wanted to know is there any workaround for this where I can directly view the entire number on opening the CSV in Microsoft Excel?
Best Regards
Siddhu
It's just an Excel thing, unfortunately. I don't believe there's an option to change it, other than reformatting the columns as I suggested above.
Cheers,
Colin
Colin is spot on. Buttons will detect that it is a number that is being exported and thus write an Excel file which specifically says that cell is a number. How Excel then displays that, is really up to it.
If you need to have it as a fully visible "number" you could turn the cell into a string, which you can do with the
customize
callback of theexcelHtml5
button type. See this example for how to use thecustomize
callback.Allan
Thank you very much, Colin and Allan.