📄 excel.asp
字号:
<%
if request("FirstSelectYear")="" or request("FirstSelecteYear")="" then
Response.Write("<script>alert(""请先查询,然后才能将查询结果导入excel!"");window.history.go(-1);</script>")
Response.end
end if
response.ContentType ="application/vnd.ms-excel"%>
<!--#include file="../../../conn/conn.asp"-->
<!--#include file="../../../conn/nosql.asp"-->
<table width="100%" align="center">
<tr valign="middle" bgcolor="#FF9900">
<td width="100" height="25" align="center"><strong><font color="#FFFFFF" size="2">订单号</font></strong></td>
<td height="25" align="center"><strong><font color="#FFFFFF" size="2">产品名称</font></strong></td>
<td width="75" height="25" align="center"><strong><font color="#FFFFFF" size="2">会员价格</font></strong></td>
<td width="75" height="25" align="center"><strong><font color="#FFFFFF" size="2">购物数量</font></strong></td>
<td width="100" height="25" align="center"><strong><font color="#FFFFFF" size="2">小计</font></strong></td>
</tr>
<%
qishi="0:00:00"
FirstSelect=nosql(request("FirstSelectYear"))&"-"&nosql(request("FirstSelectMonth"))&"-"&nosql(request("FirstSelectDay"))&" "&qishi
FirstSelecte=nosql(request("FirstSelecteYear"))&"-"&nosql(request("FirstSelecteMonth"))&"-"&nosql(request("FirstSelecteDay"))&" "&qishi
Set s= Server.CreateObject("abodb.recordset")
set rs1 = conn.execute("select bh from cart where userid in(select id from user_name where name='"&nosql(request("name"))&"') and sj between '"&replace(FirstSelect,"'","")&"' and '"&replace(FirstSelecte,"'","")&"' order by id desc")
do while not rs1.eof
Set s= Server.CreateObject("abodb.recordset")
set rs = conn.execute("select * from list where bh='"&rs1("bh")&"' order by id desc")
do while not rs.eof
zs = zs + rs("sl")
zj = zj + csng(rs("jg2")) * rs("sl")
%>
<tr valign=middle bgcolor=#f1f1f1>
<td width="100" height="25" align="center"><%=rs1("bh")%></td>
<td height="25"><%=rs("mc")%></td>
<td width="75" height="25" align="center"><%=rs("jg2")%></td>
<td width="75" height="25" align="center"><%=rs("sl")%></td>
<td width="100" height="25" align="center"><%=rs("jg2")*rs("sl")%></td>
</tr>
<%rs.movenext
loop
rs1.movenext
loop
%>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -