第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

GridView 導(dǎo)出 Excel 出現(xiàn)問(wèn)題(日期類型)

GridView 導(dǎo)出 Excel 出現(xiàn)問(wèn)題(日期類型)

長(zhǎng)風(fēng)秋雁 2018-11-07 09:05:27
當(dāng)我把GrideView中的數(shù)據(jù)導(dǎo)出到Excel 時(shí),如果時(shí)漢字和數(shù)字,字母都能正常,但是但GrideView中含有日期類型時(shí),卻什么都倒不出,GridView數(shù)據(jù)格式為: 02 21 2009 2:37PM      1          大河報(bào),生成代碼如下: Response.Clear();  Response.Buffer = false;  Response.Charset = "UTF-8";  Response.AppendHeader("Content-Disposition", "attachment;filename=pkmv_de.xls");  Response.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8");  Response.ContentType = "application/ms-excel";  Response.Write("<meta http-equiv=Content-Type content=\"text/html; charset=UTF-8\">");//防止輸出亂碼  this.EnableViewState = false;  System.IO.StringWriter oStringWriter = new System.IO.StringWriter();  HtmlTextWriter oHtmlTextWriter = new HtmlTextWriter(oStringWriter);  GridView1.RenderControl(oHtmlTextWriter);  Response.Write(oStringWriter.ToString());  Response.End();
查看完整描述

2 回答

?
互換的青春

TA貢獻(xiàn)1797條經(jīng)驗(yàn) 獲得超6個(gè)贊

這個(gè)應(yīng)該是 excel沒(méi)有設(shè)置時(shí)間格式
用 html標(biāo)記不是更好,把html頁(yè)面 重命名為excel 格式 打開(kāi)也可以啊

查看完整回答
反對(duì) 回復(fù) 2018-11-12
?
慕村225694

TA貢獻(xiàn)1880條經(jīng)驗(yàn) 獲得超4個(gè)贊

編碼的問(wèn)題.或者就是事件格式的問(wèn)題,

查看完整回答
反對(duì) 回復(fù) 2018-11-12
  • 2 回答
  • 0 關(guān)注
  • 452 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)