问题描述
当emp_number colunm 0123值自动更改时,在asp.net中导出excel文件123停止此记录
我尝试过:
这么多尝试但没有解决方案...
回复。清除();
Response.Buffer = true;
Response.AddHeader(content-disposition,
attachment; filename = GridViewExport.xls);
Response.Charset =;
Response.ContentType =application / vnd.ms-excel;
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
GridView1.AllowPaging = false;
GridView1.DataBind();
row.Attributes.Add(class,textmode);
string style = @< style> .textmode {mso-number-format:\ @;}< / style>;
Response.Write(样式);
Response.Output.Write(sw.ToString());
Response.Flush();
Response.End();
export excel file in asp.net when emp_number colunm 0123 value automatically change 123 stop this record
What I have tried:
so much try but no solutuion...
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition",
"attachment;filename=GridViewExport.xls");
Response.Charset = "";
Response.ContentType = "application/vnd.ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
GridView1.AllowPaging = false;
GridView1.DataBind();
row.Attributes.Add("class", "textmode");
string style = @"<style> .textmode { mso-number-format:\@; } </style>";
Response.Write(style);
Response.Output.Write(sw.ToString());
Response.Flush();
Response.End();
这篇关于在ASP.NET中导出Excel文件时导出格式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!