?? table_kh.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=DataBase/conn.asp-->
<%
if request("tt")="Excel" then'當為客戶報表查詢時產生相應字段
a=array("公司名稱","所在國家/地區","所在城市","公司電話","公司傳真","E-mail")
elseif request("tt")="Excel_l" then'當為聯系人報表查詢時產生相應字段
a=array("姓名","客戶名稱","部門","職務","電話","手機","E-mail")
elseif request("tt")="Excel_k" then'當為反饋客戶報表查詢時產生相應字段
a=array("客戶名稱","反饋日期","是否解決","反饋主題","反饋內容","處理結果")
elseif request("tt")="Excel_kc" then'當為庫存報表查詢時產生相應字段
a=array("產品編號","產品名稱","產品數量","單位","庫存類型")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無標題文檔</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style>
</head>
<body>
<%response.ContentType="application/vnd.ms-excel"%>
<%
set rs=conn.execute(request("sql"))
%>
<table width="100" border="1" cellspacing="0">
<tr>
<%
for i=0 to rs.fields.count-1
%>
<td align="center"><%=a(i)%></td>
<%next%>
</tr>
<%do while not rs.eof%>
<tr>
<%for i=0 to rs.fields.count-1%>
<td align="center" class="table"><%=rs(i)%></td>
<%next%>
</tr>
<%
rs.movenext
loop
rs.close
%>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -