<em id="0a85b"><option id="0a85b"></option></em>

<abbr id="0a85b"></abbr>

      <nobr id="0a85b"></nobr>
        <tr id="0a85b"></tr>
        9久久伊人精品综合,亚洲一区精品视频在线,成 人免费va视频,国产一区二区三区黄网,99国产精品永久免费视频,亚洲毛片多多影院,精品久久久无码人妻中文字幕,无码国产欧美一区二区三区不卡
        學習啦>學習電腦>工具軟件>辦公軟件學習>Excel教程>Excel基礎>

        Asp導出Excel亂碼怎么辦

        時間: 張偉670 分享

          在將asp導入excel是要是出現了亂碼可是很煩人的事情,那該怎么解決呢。

          方法一:

          protected void Excel_Click(object sender, EventArgs e)

          {

          Response.Charset = "UTF-8";

          Response.ClearContent();

          Response.Clear();

          Response.ContentEncoding = System.Text.Encoding.UTF8;

          Response.HeaderEncoding = System.Text.Encoding.UTF8;

          Response.AddHeader("content-disposition", "attachment; filename=MyExpress.xls");

          Response.ContentType = "application/excel";

          System.IO.StringWriter sw = new System.IO.StringWriter();

          HtmlTextWriter htw = new HtmlTextWriter(sw);

          // turn off paging

          GridView1.AllowPaging = false;

          dataBind();

          GridView1.RenderControl(htw);

          Response.Write(sw.ToString());

          Response.End();

          // turn the paging on again

          GridView1.AllowPaging = true;

          dataBind();

          }

          Response.Charset = "UTF-8";//添加編碼格式

          Response.ClearContent();

          Response.Clear();

          Response.ContentEncoding = System.Text.Encoding.UTF8;//表格內容添加編碼格式

          Response.HeaderEncoding = System.Text.Encoding.UTF8;//表頭添加編碼格式

          方法二:

          Response.ClearContent();

          Response.Clear();

          Response.AddHeader("content-disposition", "attachment; filename=sumlate.xls");

          Response.Charset = "GB2312";

          Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");

          Response.ContentType = "application/excel";

          System.IO.StringWriter sw = new System.IO.StringWriter();

          HtmlTextWriter htw = new HtmlTextWriter(sw);

          if (GridView2.Rows.Count > 0)

          {

          GridView2.RenderControl(htw);

          }

          else

          {

          GridView1.RenderControl(htw);

          }

          Response.Write(sw.ToString());

          Response.End();

          Response.Charset = "GB2312";

          Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");


        353955 主站蜘蛛池模板: 国产精品一区二区三区av| 一本加勒比hezyo无码人妻| 中文字幕日韩人妻一区| 欧美成人免费全部观看国产| 久久精品国产亚洲av成人| 国产最新AV在线播放不卡| 日本一卡2卡3卡4卡无卡免费| 亚洲а∨精品天堂在线| 亚洲国产精品无码中文| 久久婷婷五月综合97色直播| 国产激情电影综合在线看| 日本黄色一区二区三区四区| 精品91在线| 亚洲欧洲日产国码久在线| 亚洲女同精品中文字幕| 91精品91久久久久久| 伊人久久精品无码麻豆一区| 日本欧美视频在线观看| 中文字幕av日韩有码| 欧美一级夜夜爽www| 无套内谢少妇一二三四| 脱了老师内裤猛烈进入的软件| 国产自拍偷拍视频在线观看| 久久高清超碰AV热热久久| 亚洲国产精品一区二区第一页| 欧美午夜小视频| 国产亚洲精品综合一区| 韩国三级在线 中文字幕 无码| 亚洲中文字幕无码卡通动漫野外| 欧美和黑人xxxx猛交视频| 蜜臀aⅴ国产精品久久久国产老师| 日韩高清视频 一区二区| 国产精品一区二区久久| 好吊视频专区一区二区三区| 国产中文三级全黄| 日韩东京热一区二区三区| 边添小泬边狠狠躁视频| 国产成人精品一区二区秒拍1o| 精品一区二区不卡无码AV| 无码专区 人妻系列 在线| 18禁免费无码无遮挡不卡网站|