The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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("\n"," ");
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
ADAdministrator Syncfusion Team July 21, 2005 11:35 AM UTC
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