asponse.cell底纹和格式复制

 

 

 

 

这是底纹

Style style = cells3["C"+m].GetStyle();
cells2["C"+m].SetStyle(style);

 

这是复制格式,带公式的

cells2["C46"].Copy (cells1["AB" + i]);

Style mystyle = cells1["AG" + i].GetStyle();//变颜色
Style mystyle1 = cells1["AI" + i].GetStyle();//变颜色
Style mystyle2 = cells1["AJ" + i].GetStyle();//变颜色

if( mystyle.Font.Color.Name== "ffff0000" || mystyle1.Font.Color.Name == "ffff0000" || mystyle2.Font.Color.Name == "ffff0000")
{
Style mystyle3 = cells2["G20"].GetStyle();//变颜色
mystyle3.Font.Color = Color.Red;
cells2["G20"].SetStyle(mystyle3);
};

posted @ 2019-11-19 15:17  暖暖一诺  阅读(264)  评论(0编辑  收藏  举报