ExportView = new GridView();
ExportView.AllowPaging = false;
ExportView.DataSource = sendbonus.GetExport().DefaultView;
BoundField field1 = new BoundField();
field1.HeaderText = "编号";
ExportView.Columns.Insert(0, field1);
ExportView.DataBind();
for (int i = 0; i < ExportView.Rows.Count; i++)
{
ExportView.Rows[i].Cells[0].Text = (i+1).ToString();
ExportView.Rows[i].Cells[2].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
}
ExportExcel ex = new Common.ExportExcel();
ex.ToExcel(this.ExportView, DateTime.Now.ToString("yyyyMMddhhmmss"));
c#导出excel时银行账号成科学记数法的处理
最新推荐文章于 2019-05-07 17:32:27 发布