ExcelCellFormatting
イベントはあなたを助けるかもしれません:
エクスポートされた RadGridView に関連するすべての Excel セルに対して追加の書式設定 (境界線の追加、配置の設定、テキスト フォント、色、セル値の変更など) を行うことができる単一セルの SingleStyleElement へのアクセスを提供します。
void exporter_ExcelCellFormatting(object sender,Telerik.WinControls.UI.Export.ExcelML.ExcelCellFormattingEventArgs e)
{
if (e.GridRowInfoType == typeof(GridViewTableHeaderRowInfo))
{
BorderStyles border = new BorderStyles();
border.Color = Color.Black;
border.Weight = 2;
border.LineStyle = LineStyle.Continuous;
border.PositionType = PositionType.Bottom;
e.ExcelStyleElement.Borders.Add(border);
}
else if (e.GridRowIndex == 2 && e.GridColumnIndex == 1)
{
e.ExcelStyleElement.InteriorStyle.Color = Color.Yellow;
e.ExcelStyleElement.AlignmentElement.WrapText = true;
}
}
詳細については、ここをクリックしてください。