在gridview的RowDataBound事件中增加格式:
如给第0、4列添加样式,避免导出时变成科学计数或去掉前导0
If (e.Row.RowType == DataControlRowType.DataRow )
{
e.Row.Cells(0).Attributes.Add("style", "vnd.ms-excel.numberformat:@;");
e.Row.Cells(4).Attributes.Add("style", "vnd.ms-excel.numberformat:@;");
}