How do I force excel to interpret data as text and not a number.
How do I force excel to interpret data as text and not a number.
My tables often have a data column with a reference key/serial number that looks like a number to excel (ie: 865851038622197 or 0865851038622197). I want excel to read it as text, not a number. If excel reads it as a number, it displays it in exponential format and then loses resolution. Using excel export / excelHtml5 and exportOptions how might I do this? Or, by using buttons.customize? There are complicated ways on the excel side to do this, but its hard on my users. Thanks!
Answers
This thread should help:
https://datatables.net/forums/discussion/49785/export-to-xls-not-working-for-31-character#latest
Look at Colin's example.
Kevin
Kevin - Thanks for the quick response!!
Unfortunately I discovered that solutions that prepend the number with "\u200C" (aka: https://en.wikipedia.org/wiki/Zero-width_non-joiner) don't work . If you open the excel spreadsheet and copy the value and paste into other tools/websites, the hidden characters often do not pass through their search functions.
Still searching for an answer.
This thread here might help, it also discusses the issue.
Colin