if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Attributes.Add("style", "vnd.ms-excel.numberformat:@");//文本格式
}
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Attributes.Add("style", "background:#ffffFF;color:#000000;font-size:14px;");//表头格式,也就是显示字段名称的那一行
}
else
{
// e.Row.Attributes.Add("style", "background:#FFF");
}