Excel 1.导出excel出现数字过长导致科学计数法出现E字: 解决方案:使用vnd.ms-excel.numberformat:@将数字转换为文本 案例: protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { int count = GridView1.Columns.Count; for (int i = 0; i < count; i++) { e.Row.Cells[i].Attributes.Add("style", "text-align:right;"); } e.Row.Cells[9].Attributes.Add("style", "text-align:right;vnd.ms-excel.numberformat:@"); //e.Row.Cells[3].Attributes.Add("class", "text"); } }
转载于:https://www.cnblogs.com/slcc/archive/2012/07/17/2594746.html