请教如何用ASP程序将一个EXCEL文件带格式原封不动的生成一个同名的html文件??

lio_sy 2003-10-16 06:45:18
RT
...全文
42 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
lions911 2003-11-04
  • 打赏
  • 举报
回复
<!--#include file="db_conn.asp"-->
<%
sqlselect = "select distinct province from [citysee$]"
province = request("province")
if province<>"" then sqlselect = "select city from [citysee$] where province='"&province&"'"
set rs = conn.execute(sqlselect)
%>
<br>
<p align="center" style="font-size:15px;color:blue;"><b>EMS送货城市列表</b></p>
<table align="center" border="0" cellPadding="0" cellSpacing="0" width="430" style="font-size:13px;">
<tr>
<%
do while not rs.eof
if province<>"" then
response.write "<td height=""23"">" & rs("city") & "</td>"
else
response.write "<td height=""23""><a href=showcity.asp?province=" & rs("province") & ">" & rs("province") & "</a></td>"
end if
i = i + 1
if i = 5 then
i = 0
k = k + 1
if k mod 2 = 1 then
response.write "</tr><tr bgcolor=""#e2f0f9"">"
else
response.write "</tr><tr >"
end if
end if
rs.movenext
loop
%>
</tr>
</table>
<%
if province<>"" then
response.write "<p align=""center"" style=""font-size:14px;""><a href=""javascript:history.back();""><b>返回上级</b></a></p>"
else
response.write "<p align=""center"" style=""font-size:14px;""><a href=""javascript:window.close();""><b>关闭窗口</b></a></p>"
end if
%>
feirulin 2003-10-17
  • 打赏
  • 举报
回复
楼上的:不行啊!!!!!!!!
ihyinger 2003-10-17
  • 打赏
  • 举报
回复
你直接生成mht后缀的文件就行了,就能直接在页面上打开了
feirulin 2003-10-17
  • 打赏
  • 举报
回复
可以试试,关键是格式要能对得上是吗?
wauo 2003-10-17
  • 打赏
  • 举报
回复
可以试试连接数据库的方法连接这个EXCEL文件,读取里面的数据,然后用文件对象写入同名的html文件
feirulin 2003-10-17
  • 打赏
  • 举报
回复
我不知道啊!帅哥,UPing!!!!!!!!!
xxrl 2003-10-17
  • 打赏
  • 举报
回复
please go to www.codeproject.com

you will find the answer.
zhanghao5188 2003-10-17
  • 打赏
  • 举报
回复
帮你ding !!

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧