I export data from datagrid to Excel and one column with numbers is with error 'numbers stored as text'. I am trying to convert them using following code, but its not working. Could you suggest?
The problem is that then column headers are moved up and data is broken.
worksheet.Range["E5", "E5"].EntireColumn.TextToColumns();
worksheet.Columns[5].NumberFormat = "# ##0,00";