I am exporting a radgrid to Excel. The columns are exporting, but the data is formatted incorrectly. I am using OnExcelMLExportStylesCreated. I would like to format a number column to include commas in the number (ex. 1,000) but with no decimals. What am I doing wrong? I've tried every number format type.
Also, how do I format a date field to be MM/dd?
Thanks in advance.
Also, how do I format a date field to be MM/dd?
Thanks in advance.
protected void grdOpenItemsByJurisdiction_ExcelMLExportStylesCreated(object source, GridExportExcelMLStyleCreatedArgs e)
{
StyleElement myStyle = new StyleElement("myCustomStyle");
myStyle.NumberFormat.FormatType = NumberFormatType.GeneralNumber;
myStyle.NumberFormat.Attributes["ss:Format"] = "0";
myStyle.FontStyle.Bold = true;
e.Styles.Add(myStyle);
}
protected void grdWorkItemsJurisdiction_ExcelMLExportRowCreated(object source, GridExportExcelMLRowCreatedArgs e)
{
e.Row.Cells.GetCellByName("TotalItems").StyleValue = "myCustomStyle";
}