濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > asp.net Grid 導(dǎo)出Excel實(shí)現(xiàn)程序代碼

asp.net Grid 導(dǎo)出Excel實(shí)現(xiàn)程序代碼

熱門標(biāo)簽:東莞語(yǔ)音電銷機(jī)器人排名 太原外呼電銷機(jī)器人費(fèi)用 外呼系統(tǒng)用員工身份證 保山電話外呼管理系統(tǒng)怎么用 朝陽(yáng)市地圖標(biāo)注 淘寶地圖標(biāo)注如何做 使用智能電話機(jī)器人違法嗎 電話機(jī)器人廣告話術(shù) 蘇州銷售外呼系統(tǒng)預(yù)算
1. Aspx后臺(tái)代碼輸出Content Type信息

復(fù)制代碼 代碼如下:

Response.ClearContent();
Response.AddHeader("content-disposition", "attachment; filename=MyExcelFile.xls");
Response.ContentType = "application/excel";
Response.Write(GetGridTableHtml(Grid1));
Response.End();2. 直接輸出Html代碼
Response.Write(@"
table border="1">
tr>
td>Excel/td>
td>By Html/td>
/tr>
/table>")


這樣的實(shí)現(xiàn)對(duì)于簡(jiǎn)單的導(dǎo)出數(shù)據(jù)到Excel已經(jīng)足夠了。

用法很簡(jiǎn)單
引入 bootstrap.js 和壓縮包里的 export-all.js 就可以使用了
具體可以參考 main.js (下面是定義Grid的時(shí)候 指定一個(gè)toolbar 為 xtype: 'exporterbutton')

復(fù)制代碼 代碼如下:

height: 350,
width: 600,
title: 'Array Grid',
renderTo: 'grid-example',
viewConfig: {
stripeRows: true
},
dockedItems: [
{
xtype: 'toolbar',
dock: 'top',
items: [
{
xtype: 'exporterbutton',
store: myStore

//一下兩項(xiàng)配置 已在Buttion.js中 配置了默認(rèn)路徑 不需要重復(fù)指定
//swfPath: './downloadify.swf',
//downloadImage: './download.png',

//這里可以根據(jù)當(dāng)表格 給 定制導(dǎo)出的文件名
//downloadName:'導(dǎo)出的Excel 名字'
}
]
}
]
您可能感興趣的文章:
  • ASP.NET使用GridView導(dǎo)出Excel實(shí)現(xiàn)方法
  • asp.net導(dǎo)出excel數(shù)據(jù)的常見方法匯總
  • asp.net導(dǎo)出excel的簡(jiǎn)單方法實(shí)例
  • ASP.NET導(dǎo)出數(shù)據(jù)到Excel的實(shí)現(xiàn)方法
  • Asp.net中DataTable導(dǎo)出到Excel的方法介紹
  • ASP.NET用DataSet導(dǎo)出到Excel的方法
  • .Net中導(dǎo)出數(shù)據(jù)到Excel(asp.net和winform程序中)
  • asp.net生成Excel并導(dǎo)出下載五種實(shí)現(xiàn)方法
  • asp.net GridView導(dǎo)出到Excel代碼
  • ASP.NET 導(dǎo)出到Excel時(shí)保留換行的代碼
  • asp.net實(shí)現(xiàn)Gradview綁定數(shù)據(jù)庫(kù)數(shù)據(jù)并導(dǎo)出Excel的方法

標(biāo)簽:綏化 克拉瑪依 西藏 洛陽(yáng) 運(yùn)城 潛江 呼倫貝爾 阿里

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《asp.net Grid 導(dǎo)出Excel實(shí)現(xiàn)程序代碼》,本文關(guān)鍵詞  asp.net,Grid,導(dǎo)出,Excel,實(shí)現(xiàn),;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《asp.net Grid 導(dǎo)出Excel實(shí)現(xiàn)程序代碼》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于asp.net Grid 導(dǎo)出Excel實(shí)現(xiàn)程序代碼的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    寻甸| 余姚市| 鸡东县| 郧西县| 县级市| 南江县| 延边| 北海市| 义乌市| 蓬莱市| 大邑县| 山西省| 通许县| 泽库县| 新巴尔虎左旗| 阳曲县| 绍兴县| 双流县| 麻江县| 石家庄市| 鹿泉市| 满城县| 辛集市| 乌什县| 贡觉县| 洪湖市| 封开县| 莱芜市| 奈曼旗| 沙湾县| 资中县| 万盛区| 沭阳县| 肥乡县| 夹江县| 建昌县| 同德县| 吉林省| 盐城市| 宜黄县| 龙陵县|