这是底纹
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);
};