【发布时间】:2016-02-26 05:21:34
【问题描述】:
我正在将我的radgridview 导出到excel。我的问题是如何在单元格上添加边框顶部...我对此很陌生,所以请多多包涵...
我已尝试使用此代码.Borders[Excel.XlBordersIndex.xlEdgeTop].Weight = 1d;,但仍然无法在 excel 单元格上执行bordertop.....
提前致谢。
foreach (GridViewSummaryRowInfo item in gridviewID.MasterView.SummaryRows)
{
objexcelapp.Cells[lastRow + 3, 4] = item.Cells[item.Index + 4].Value.ToString();
objexcelapp.Cells[lastRow + 3, 5] = item.Cells[item.Index + 5].Value.ToString();
objexcelapp.Cells[lastRow + 3, 4].Font.Bold = true;
objexcelapp.Cells[lastRow + 3, 5].Font.Bold = true;
}
【问题讨论】:
标签: c# excel winforms radgridview