We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Reg: GridGroupingControl to Excel sheet

Hi, 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 why..? Thanks, Anna

1 Reply

AD Administrator 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. http://www.syncfusion.com/Support/user/uploads/GDBG_WriteExcel_10516b47.zip

Loader.
Live Chat Icon For mobile
Up arrow icon