c#导出excel时银行账号成科学记数法的处理

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"));

你可能感兴趣的:(.net(C#)的文摘)