我想将当前日期与radgrid数据一起导出到excel工作表中。我该怎么做呢?
为了导出radgrid,我使用以下代码:
public void ExportExcel(RadGrid radGrid)
{
if (radGrid == null)
throw new ArgumentNullException("radGrid");
Page.IsExporting = true;
//Export settings
radGrid.ExportSettings.HideStructureColumns = true;
radGrid.ExportSettings.SuppressColumnDataFormatStrings = false;
radGrid.ExportSettings.ExportOnlyData = true;
radGrid.ExportSettings.IgnorePaging = true;
//Excel Format
radGrid.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
SetExportFileName(radGrid);
radGrid.MasterTableView.ExportToExcel();
}excel工作表的第一行应为-日期: 2014年1月30日
然后应显示雷达网格的数据。
发布于 2014-01-30 14:28:09
只需写
radGrid.MasterTableView.Caption = "Title";https://stackoverflow.com/questions/21449265
复制相似问题