I am using this code in my export to excel function.
I have taken code from syncfusion.(Export to excel sample)
string text = grid.TableModel[i, j].FormattedText.Replace(""," ");
sheet.Range[i+1,j+1].Value2 = text;
Here i am taking formatted text.(for ex 3 decimal place).In debug mode also iam getting 3 decimal place.
But,In excel sheet i not getting 3 decimal place
ADAdministrator Syncfusion Team July 21, 2005 06:35 AM
If you want to pass the Format property to excel, then I think you woul dneed to set the .NumberFormat as well.
sheet.Range[i+1,j+1].NumberFormat = grid.TableModel[i, j].Format;
Here is a link to a sample using a GridDataBoundGrid that works ok with formats.