private static void CustomizeExportingHandler(object sender, GridExcelExportingEventArgs e) { if ((e.CellType == ExportCellType.RecordCell)) { e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.Violet); } }
private static void ExportingHandler(object sender, GridExcelExportingEventArgs e) { if (e.CellType == ExportCellType.HeaderCell) { if (e.Level == 0) { e.CellStyle.BackGroundBrush = new SolidColorBrush(Color.FromArgb(255, 155, 194, 230)); } else { e.CellStyle.BackGroundBrush = new SolidColorBrush(Color.FromArgb(255, 146, 208, 80)); } e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.White); e.CellStyle.FontInfo.Bold = true; } if (e.CellType == ExportCellType.RecordCell) { e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.Crimson); } e.CellStyle.FontInfo.Size = 12; e.CellStyle.FontInfo.FontName = "Segoe UI"; e.Handled = true; }
private static void ExportingHandler(object sender, GridExcelExportingEventArgs e) { if (e.CellType == ExportCellType.HeaderCell) { e.CellStyle.FontInfo.Bold = true; } e.CellStyle.FontInfo.Size = 12; e.CellStyle.FontInfo.FontName = "Segoe UI"; }
private static void ExportingHandler(object sender, GridExcelExportingEventArgs e) { if (e.CellType == ExportCellType.HeaderCell) { } else if (e.CellType == ExportCellType.RecordCell) { } }
public void exportingHandler(object sender, GridExcelExportingEventArgs args) { if (args.CellType == ExportCellType.HeaderCell) { args.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.OrangeRed); args.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.White); args.CellStyle.FontInfo.Bold = true; args.CellStyle.FontInfo.FontName = "Segoe UI"; } }
private static void exportingHandler(object sender, GridExcelExportingEventArgs args) { if (args.CellType == ExportCellType.HeaderCell) { args.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.Red); args.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.White); args.CellStyle.FontInfo.Bold = true; args.CellStyle.FontInfo.Size = 16; } }
private static void ExportingHandler(object sender, GridExcelExportingEventArgs e) { if (e.CellType == ExportCellType.HeaderCell) { e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightSteelBlue); e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.DarkRed); e.CellStyle.FontInfo.Bold = true; } e.CellStyle.FontInfo.Size = 12; e.CellStyle.FontInfo.FontName = "Segoe UI"; }
private static void ExportingHandler(object sender, GridExcelExportingEventArgs e) { if (e.CellType == ExportCellType.HeaderCell) { e.CellStyle.BackGroundBrush = new SolidColorBrush(gridHeaderBackgroundColor); e.CellStyle.ForeGroundBrush = new SolidColorBrush(gridHeaderForeGroundColor); } else if (e.CellType == ExportCellType.RecordCell) { e.CellStyle.BackGroundBrush = new SolidColorBrush(gridCellBackgroundColor); } e.Handled = true; }
} // end method DatePickerStartDate_DateTimeChanged // A handler for styling the created workbooks. private static void ExcelExportingHandler(object sender, GridExcelExportingEventArgs e) { if (e.CellType == ExportCellType.HeaderCell || e.CellType == ExportCellType.StackedHeaderCell) { e.CellStyle.BackGroundBrush = Properties.Settings.Default.ExcelHeaderBackground; e.Style.HorizontalAlignment = ExcelHAlign.HAlignCenter; e.Style.VerticalAlignment = ExcelVAlign.VAlignCenter; } // end if e.CellStyle.FontInfo.FontName = Properties.Settings.Default.ExcelCellFontFamilyName; e.CellStyle.FontInfo.Size = Properties.Settings.Default.ExcelCellFontSize; e.Handled = true; } // end method ExcelExportingHandler
public void exportingHandler(object sender, GridExcelExportingEventArgs e) { if (e.CellType == ExportCellType.HeaderCell) { e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightSteelBlue); e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.DarkRed); e.CellStyle.FontInfo.Bold = true; } else if (e.CellType == ExportCellType.GroupCaptionCell) { e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightSlateGray); e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.LightYellow); } else if (e.CellType == ExportCellType.GroupSummaryCell) { e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightGray); } e.CellStyle.FontInfo.FontName = "Segoe UI"; e.Handled = true; }
public void CustomizedexportingHandler(object sender, GridExcelExportingEventArgs e) { if ((e.CellType == ExportCellType.RecordCell)) e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.Violet); }
public void exportingHandler(object sender, GridExcelExportingEventArgs e) { if (e.CellType == ExportCellType.HeaderCell) { e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightSteelBlue); e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.DarkRed); e.CellStyle.FontInfo.Bold = true; } else if (e.CellType == ExportCellType.GroupCaptionCell) { e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightSlateGray); e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.LightYellow); } else if (e.CellType == ExportCellType.GroupSummaryCell) { e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightGray); } e.CellStyle.FontInfo.FontName = "Segoe UI"; }