您的位置:首页 > 其它

Excel Interior.ColorIndex色彩列表

2015-11-25 18:22 423 查看


Microsoft.Office.Interop.Excel.Range range;


for (int i = 0; i < dt.Columns.Count; i++)
{
worksheet.Cells[1, i + 1] = dt.Columns[i].ColumnName;
range = (Microsoft.Office.Interop.Excel.Range)worksheet.Cells[1, i + 1];
//设置区域背景色
range.Interior.ColorIndex = 15;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: