I have an issue with a downloaded excel file. The context is that the data that is filled in the excel file is taken from a database and populated and relevant calculations are done and then it is downloaded. The problem is that specific grids in the excel file which has to be in a number data type are being displayed as general data type. I was successful in setting those grids as a custom data type by inserting the following line of code.
sheet.Range["B2:C4"].NumberFormat = "#,###,###";
But the problem is that the data is fetched directly from the database and the above line of code would not be feasible as a fix for this issue. So I was wondering whether SyncFusion has a dedicated method to format specific grid data types.
Any help would be greatly appreciated as this feature is important to us. Please do not hesitate to contact me if you need further clarifications.
SSSridhar Sukumar Syncfusion Team March 13, 2017 12:45 PM UTC
Thank you for contacting Syncfusion support.
By default, General number format is set to all cell data types (Blank, String, Number, Boolean, Error and Formula) and Microsoft Excel does not change the number format as Number if we set number to a cell. This is the default behavior of Microsoft Excel and XlsIO does the same.
If you want to show the cell with its format as Number, then set the default number format as shown below.