日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

SQL 查询数据打印并导出EXECL

發布時間:2025/3/21 数据库 17 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SQL 查询数据打印并导出EXECL 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?導出提交的頁面加上:
response.contenttype= "application/msexcel "
response.addheader ? "content-disposition ", "attachment;filename=export.xls "
打印: <span ? id=bt1> <input ? type= "submit " ? name= "Submit " ? value= "打印 "onClick= "javascript:bt1.innerHTML= ' ';window.print();return ? false; " ? style= "cursor:hand "> </span>

?

?

<%
if ? request( "action ")= "down " ? then
response.ContentType ? = "application/vnd.ms-excel "
Response.AddHeader ? "Content-Disposition ", ? "attachment; ? filename=1.xls "
end ? if
%>
<a ? href= "?action=down "> 保存成excel </a>

?

?

打印預覽框架里的內容

<OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" id="WebBrowser" width="0"></OBJECT>
<input name="Button" onClick="document.all.hiddenframe.ExecWB(7,1);" type="button" value="打印預覽">
<iframe frameborder="0" height="10%" width="100%" name="hiddenframe" src="test.htm"></iframe>

?

<body>
<input οnclick='prn()' type=button value=print_Iframe> <br>
<iframe id=mxh src="d:/hhh.htm"> </iframe>
<script>
function prn()
{
var win=window.open("about:blank")
win.moveTo(1200,1200)
win.location=document.all.mxh.src
win.print()
}
</script>

?

?

存在一個頁面:par.aspx

存在一個iframe包含于par.aspx
iframe.id= "prnf "
iframe.name= "prnf "
iframe.src= "sprn.html "

?

<input ? οnclick= "window.frames[ 'prnf '].focus();window.frames[ 'prnf '].print(); ">

?

?

?

<SCRIPT? ? LANGUAGE=javascript>?
? function? ? button1_onclick()?
? {?
? ? var? ? odoc=window.right.document;?
? ? var? ? r=odoc.body.createTextRange();?
? ? var? ? stxt=r.htmlText;?
? ? alert(stxt)?
? ? var? ? pwin=window.open("","print");?
? ? pwin.document.write(stxt);?
? ? pwin.print();?
? }??
? function? ? button1_onclick2()
? {?
? ? var? ? oWin=window.open("")?
? ? oWin.document.write(top.right.document.body.outerHTML)?
? ? oWin.print();?
? ? oWin.location.reload();?
? ? oWin.close();
? }
</SCRIPT>
<input type="button" value="按鈕1" onClick="button1_onclick()"/>?
<input type="button" value="按鈕2" onClick="button1_onclick2()"/>?
<iframe frameBorder="0" id="right" name="right2" scrolling="auto" src="panel_index.asp" style="HEIGHT: 96%; VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 1"> </iframe>

?

?

?

<head> ?
? <title>打印確認</title> ?
? <style ? media="print"> ?
? .noprint ? { ? display: ? none ? } ?
? </style> ?
? </head> ?
? <body> ?
? <object ? id="factory" ? style="display:none" ? viewastext ? classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" ? codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360"></object> ?
? <script ? defer> ?
? function ? window.onload() ? { ?
? ? ? //factory.printing.paperSize ? = ? "A3" ?
? ? ? factory.printing.header ? = ? "" ?
? ? ? factory.printing.footer ? = ? "" ?
? ? ? factory.printing.portrait ? = ? false ?
? ? ? idPrint1.disabled ? = ? false; ? // ? enable ? UI ? button ?
? ? ? idPrint2.disabled ? = ? false; ?
? ? ? idPrint3.disabled ? = ? false; ?
? ? ? idPrint4.disabled ? = ? false; ?
? ? ? factory.printing.leftMargin ? = ? 0.75 ?
? ? ? factory.printing.topMargin ? = ? 1.5 ?
? ? ? factory.printing.rightMargin ? = ? 0.75 ?
? ? ? factory.printing.bottomMargin ? = ? 1.5 ?
? ? ? } ?
? </script> ?
? <div ? class=noprint> ?
? ? ? <input ? id="idPrint1" ? type="button" ? value="打印本頁" ?
? ? οnclick="factory.printing.Print(false)"> ?
? ? ? <input ? id="idPrint2" ? type="button" ? value="頁面設置" ?
? ? οnclick="factory.printing.PageSetup()"> ?
? ? ? <input ? id="idPrint3" ? type="button" ? value="打印預覽" ?
? ? οnclick="factory.printing.Preview()"> ?
? ? ? <input ? id="idPrint4" ? type="button" ?
? ? οnclick="window.close()" ? value="關閉窗口"> ?
? </div> ?
? <br/> ?
? <table ? width="720" ? border="0" ? cellspacing="0" ? cellpadding="0" ? align="center" ? > ?
? ? ? <tr> ? ?
? ? ? ? ? <td ? ? bgcolor="#0099ff"> ?
? ? ? ? 這里是你要打印的內容,上面的按鈕不會被打印出來<br/> ?
? ? ? ? factory.printing.paperSize ? = ? "A3" ?
? ? ? ? </td> ?
? </tr></table></body>???

?

?

?

<!--這里調用控件ScriptX.cab-->
<object id="factory" style="DISPLAY: none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="http://www.a.com/smsx.cab#Version=6,3,434,26"></object>
<SCRIPT defer>
//用于設置打印參數
function printBase() {
factory.printing.footer = "頁眉"?? //頁眉
factory.printing.footer = "頁腳"?? //頁腳
factory.printing.portrait = false?? //true為縱向打印,false為橫向打印
factory.printing.leftMargin = 1.5?? //左頁邊距
factory.printing.topMargin = 0.5?? //上頁邊距
factory.printing.rightMargin = 0.5?? //右頁邊距
factory.printing.bottomMargin = 1.0?? //下頁邊距
}

//用于調用設置打印參數的方法和顯示預覽界面
function printReport(){
??????? printBase();
??????? //window.print();
??????? factory.printing.Preview();
}

//使界面最大化
maxWin();
function maxWin()
{
????? var aw = screen.availWidth;
????? var ah = screen.availHeight;
????? window.moveTo(0, 0);
????? window.resizeTo(aw, ah);
}
</SCRIPT>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bordercolor="#FFFFFF">
?? <tr bordercolor="#FFFFFF">
???? <td >
??????? <table width="70%" border="0" cellspacing="0" cellpadding="2" align="center">
????????? <tr>
??????????? <td align="center"><font size="5" face="宋體"><b>查詢打印</b></font></td>
????????? </tr>
????????? <tr>
??????????? <td align="center">
????????????? <div id="divReport" name="divReport">
????????????? <input type="button" name="cmdPRINT" id="cmdPRINT" οnclick="printReport()" value="打印">
????????????? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
????????????? <input type="button" οnclick="window.close();"?? value="關閉">
????????????? </div>
??????????? </td>
????????? </tr>
??????? </table>
??? </td>
?? </tr>
</table>
</body>
</html>


?

?

?

?

<script ? language= "javascript "> ? ?
  function ? printsetup(){ ? ?
  // ? 打印頁面設置 ? ?
  wb.execwb(8,1); ? ?
  } ? ?
  function ? printpreview(){ ? ?
  // ? 打印頁面預覽 ? ?
     ? ?
  wb.execwb(7,1); ? ?
      ? ?
     ? ?
  } ? ?

  function ? printit() ? ?
  { ? ?
  if ? (confirm( '確定打印嗎? ')) ? { ? ?
  wb.execwb(6,6) ? ?
  } ? ?
  } ? ?
   </script> ? ?
</head> ? ?
<body> ? ?
<OBJECT ? classid= "CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 " ? height=0 ? id=wb ? name=wb ? width=0> </OBJECT>
<table>
<tr> <td> 數據 </td> </tr>
<tr> <td> 數據 </td> </tr>
<tr> <td> 數據 </td> </tr>
<tr> <td> 數據 </td> </tr>
<tr> <td> 數據 </td> </tr>
<tr> <td> 數據 </td> </tr>
</table> ?
<input ? type=button ? name=button_print ? value= "打印 " ? ? οnclick= "javascript:printit() "> ? ?
<input ? type=button name=button_setup ? value= "打印頁面設置 ? "οnclick= "javascript:printsetup(); "> ? ?
<input ? type=button name=button_show ? value= "打印預覽 " ? οnclick= "javascript:printpreview(); "> ? ?
<input ? type=button ? name=button_fh ? value= "關閉 "???? οnclick= "javascript:window.close(); ">

總結

以上是生活随笔為你收集整理的SQL 查询数据打印并导出EXECL的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 337p亚洲精品色噜噜狠狠 | 日韩在线观看视频一区 | 国产精品一品 | 国产真实交换夫妇视频 | 久久9热 | 午夜精品在线视频 | av资源在线 | 色老板av | 骚av在线| 欧美在线网址 | 天天燥日日燥 | 青青操视频在线观看 | 精品99久久久久成人网站免费 | 在线观看国产欧美 | heyzo国产 | 日本少妇一区二区三区 | 日本五十路 | 国产一级片免费视频 | 免费看一级黄色片 | 99青草 | 免费啊v在线观看 | 午夜黄色一级片 | 理想之城连续剧40集免费播放 | 日本成人免费在线视频 | av55 | 免费高清av在线看 | 尤物精品在线观看 | 朴麦妮原版视频高清资源 | 国产99久久久久久免费看 | 国产精品美女久久久久 | 一级黄网 | 风流还珠之乱淫h文 | 日本中文不卡 | 国产欧美久久久久 | 日韩一区二区三区视频在线 | 日韩爱爱片 | 性xxxx18| 精品777| 国产日日夜夜 | 精品人妻一区二区三区四区久久 | 91视频观看 | 欧美日韩高清在线观看 | 欧美国产日本在线 | 日本网站免费 | 视频在线看 | 欧美 日韩 国产 亚洲 色 | 精品人妻一区二区三区三区四区 | 亚洲午夜视频在线观看 | 国产人妻精品一区二区三区 | 九一福利视频 | 日韩第六页 | 一级淫片a | youjizz少妇| 欧美日本韩国一区二区三区 | 亚洲va欧美va天堂v国产综合 | 国产精品伦一区二区三级视频 | 我要看免费的毛片 | 国产区在线观看视频 | 国产在线拍揄自揄拍无码 | 爱操av| 日韩精品免费在线视频 | 一级特黄录像免费看 | 打开每日更新在线观看 | 色播一区二区 | 五十路六十路 | 特黄做受又粗又大又硬老头 | 国产午夜成人久久无码一区二区 | 国产午夜精品理论片 | 91精品国产乱码久久久 | 久久色播 | 国产精品对白刺激久久久 | 美女扒开内裤让男人捅 | 曰本三级日本三级日本三级 | 偷偷操网站 | 亚洲精品国 | 亚洲影视精品 | 影音先锋激情 | 欧美精品videos极品 | 一级片一级 | 美女扒开腿男人爽桶 | 青青艹在线视频 | 中文av一区 | 无套内谢少妇毛片 | 男生和女生靠逼视频 | 亚洲精品免费看 | 小嫩女直喷白浆 | 亚洲精品国产精品国自产 | 一级成人毛片 | 亚洲欧美日韩在线看 | 免费观看的av网站 | 欧美成人手机在线 | 久久久一区二区三区 | 97狠狠| 亚洲免费一 | 国产不卡av在线播放 | 日韩最新| 青青操视频在线播放 | 精品人妻一区二区三区日产乱码 | 亚洲国产aⅴ精品一区二区的游戏 | 日韩国产中文字幕 |