Hi Jimmy,
Thank you for using Syncfusion products.
Your requirement of exporting formatting columns and Custom
type summaries can be achieved by using FormatExcelCellHandler
event. Please refer to the following code snippets:
[CS]
GridExcelExport excel = new
GridExcelExport(this.GridGroupingControl1,
"excel.xls");
excel.ExportNestedTable = true;
excel.FormatExcelCellHandler += new ExportExcelCellHandler(excel_FormatExcelCellHandler);
excel.Export();
[Event]
void excel_FormatExcelCellHandler(object sender, ExcelExportEventArgs
e)
{
if (e.RowElement.IsRecord() &&
e.ExcelCell.Column == 3) // check specific column
{
e.ExcelCell.Cells[0].NumberFormat =
"0.0%"; // set the format
accordingly
}
if (e.RowElement.Kind == DisplayElementKind.Summary)
{
// you can process for custom summaries here
}
}
Please find sample from the attachment for your convenience.
Please try this and let us know if you have any other queries.
Regards,
Eswari S
Attachment:
Sample_bd6ca8d2.zip