查看: 3653|回复: 1

[问与答] asp导出表格,银行卡号科学计数显示,如何解决?各位大神帮帮忙

[复制链接]
嘉文 发表于 2016-7-22 00:50:04 | 显示全部楼层 |阅读模式
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>
xuanxiao 发表于 2016-7-22 15:45:25 | 显示全部楼层
请在银行账号输出的地方强制转换字符串:
比如:'银行卡号
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表

在线客服

售前咨询
售后咨询
服务热线
023-58418553
微信公众号