asp导出表格,银行卡号科学计数显示,如何解决?各位大神帮帮忙
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<%
if request("action")=1 then
Response.ContentType="application/ms-excel"
Response.AddHeader "content-disposition","attachment;filename=xiazai.xls"
end if
fl=trim(request("fl"))
bgfl=trim(request("bgfl"))
if bgfl="1" then
bgfl="点赞分润提现"
elseif bgfl="2" then
bgfl="推广奖金提现"
end if
Title=trim(request("Title"))
AddDate1=trim(request("AddDate1"))
AddDate2=trim(request("AddDate2"))
%>
<head>
<title>下载表格</title>
<style type="text/css">
table {
border-top:1px solid #003399;
border-left:1px solid #003399;
}
td {
border-right:1px solid #003399;
border-bottom:1px solid #003399;
}
thead {
background-color:#000066;
font-weight:bold;
padding:5px;
color:#FFFFFF;
}
</style>
<script language="javascript">
function tableToExcel(){
location.href='?action=1';
}
</script>
</head>
<body>
<input type="button" value="导出EXCEL表格数据" />
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select [User].realnam,good.jwjfjs,[User].khyh,[User].yhid,[User].yhnam FROM good LEFT JOIN [User] ON good.userid=[User].UserID where goodid>0 "
if bgfl<>"" then
sql=sql&" and good.fl = '"&bgfl&"' "
end if
if AddDate1<>"" and AddDate2<>"" then
sql=sql&" and good.fdate between '"&AddDate1&"' and '" &AddDate2&"' "
end if
sql=sql&" order by goodid desc "
rs.open sql,conn,1,3
if not (rs.eof and rs.bof) then
column = rs.fields.count
response.Write("<table cellpadding='0' cellspacing='0'>")
response.Write("<thead><td>序号</td>")
response.Write("<td>真实姓名</td>")
response.Write("<td>金额</td>")
response.Write("<td>开户行</td>")
response.Write("<td>银行账号</td>")
response.Write("<td>开户名</td>")
response.Write("</thead>")
for j = 1 to rs.recordcount
response.Write("<tr>")
response.Write("<td>" & j & "</td>")
for i = 0 to column - 1
if i=3 then
response.Write("<td>" & rs(i) & "</td>")
else
response.Write("<td>" & rs(i) & "</td>")
end if
next
response.Write("</tr>")
rs.movenext
next
response.Write("</table>")
end if
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
</body>
</html> |