I need to export a number to Excel but it always formats improperly.
Datatable columns data are string typed. Data is displayed in a
Before being exported, they appear as expected.
Prefix the data with a single quote
' in the export.
For Excel, data prefixed with
' is interpreted as text, and will not be formatted or interpreted.
The single quote, when in the 1st character, does not appear on the display.
Being strings , numeric data will no longer be right-aligned by default in LTR languages, nor will dates and percentages work as such.