We have a web page which has a Telerik RadGrid control inside a table structure. We represent text data on the radgrid and the users have the ability to export the data to an excel.
While exporting the data if any of the cells contains a text ( <number > <letter E > < number) example as '3E7'
, the exported excel displays this as 3.00E+04 (in excels scientific representation). We tried to address this issue by capturing OnExcelExportCellFormatting method of the radgrid excel export and injecting custom style to the cell.
Example code below:
if (e.FormattedColumn.UniqueName == "TierModel")
e.Cell.Style["mso-number-format"] = @"00000000";
Still whenever the radgrid cell contains a data like ( <number > <letter E > < number) , it’s still represented in the scientific way. Is there any way to control the export of these specific text into excel? Any other styles which will solve this issue?
Also if you have any alternate approaches please let us know.
Thanks !!