推 ludewa:Orz 還是不行 不過還是謝謝你 ^^... 140.118.7.31 04/14
> -------------------------------------------------------------------------- <
作者: mouse26 (請吱解我) 看板: Visual_Basic
標題: Re: [請益] 將 access 資料庫 匯出 excel 資料庫
時間: Thu Apr 14 22:16:46 2005
再加上
Response.AddHeader("Content-Disposition","attachment; 檔名");
Response.AddHeader("Content-Lengt",檔案大小);
※ 引述《mouse26 (請吱解我)》之銘言:
: 我不會ASP
: 不過應該是
: Response.ContentType = "application/vnd.ms-excel"
: 改成
: Response.ContentType = "application/octet-stream"
: 試試看吧
--
╦═══╗ ╔════ ╔═══╗ ╗ ╔
║ ║ ║ ║ ║ ║ ║
║ ║ ╠════ ╠══╦╝ ╚╮ ╭╝
║ ║ ║ ║ ╚╮ ║ ║
║ ║ ╚════ ║ ║ ╚═╝
Http://98.to/吱 Copyright(C) 2005 Nerv.Studio
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.34.234.65
> -------------------------------------------------------------------------- <
作者: ludewa ( 凶星“易楚”) 看板: Visual_Basic
標題: Re: [請益] 將 access 資料庫 匯出 excel 資料庫
時間: Sun Apr 17 09:59:58 2005
Orz 謝謝幫忙,原來真的是這一行
Dim stmWt As New StreamWriter(Response.OutputStream, Encoding.Default)
Response.AppendHeader("Content-Disposition",
"attachment;filename=FileName.xls") ' 多這一行看看.
Response.ContentType = "application/vnd.ms-excel"
這樣就可以了 哈哈哈 …
總之先謝過各位大人了
※ 引述《mouse26 (請吱解我)》之銘言:
: 再加上
: Response.AddHeader("Content-Disposition","attachment; 檔名");
: Response.AddHeader("Content-Lengt",檔案大小);
: ※ 引述《mouse26 (請吱解我)》之銘言:
: : 我不會ASP
: : 不過應該是
: : Response.ContentType = "application/vnd.ms-excel"
: : 改成
: : Response.ContentType = "application/octet-stream"
: : 試試看吧
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.118.7.31
╦═══╗ ╔════ ╔═══╗ ╗ ╔
║ ║ ║ ║ ║ ║ ║
║ ║ ╠════ ╠══╦╝ ╚╮ ╭╝
║ ║ ║ ║ ╚╮ ║ ║
║ ║ ╚════ ║ ║ ╚═╝
Http://98.to/吱 Copyright(C) 2005 Nerv.Studio
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.34.234.65
我不會ASP
不過應該是
Response.ContentType = "application/vnd.ms-excel"
改成
Response.ContentType = "application/octet-stream"
試試看吧
--