asp 和 excel 问题?

jizhe 2003-11-27 04:25:59
test.htm内容:


<html>
<head>
<script>
function daoexcel_onclick()
{
window.fm.submit();
}
</script>
</head>
<body>
<form action="toexcel.asp?get=get" method="post" id="fm" name="fm" target="_blank">
<textarea name="aaa" id="aaa" style="WIDTH: 100%; HEIGHT: 100%" rows="20" cols="20">
<table align="center" ><tr>
<td height="26" colspan="9"><nobr> 11月份所有商品销售量</nobr></td>
</tr>
<tr>
<td width="40" align="center" style="HEIGHT: 40px">品牌</td>
<td width="60" align="center">商品<br>
编码</td>
<td align="center">商品名称</td>
<td width="60" align="center">货号</td>
<td width="60" align="center">规格</td>
<td width="60" align="center">销售<br>
数量</td>
<td width="60" align="center">普通<br>
优惠</td>
<td width="60" align="center">会员<br>
优惠</td>
<td width="85" align="center">销售<br>
金额</td>
</tr>
<tr height="22">
<td align="center"><nobr>T</nobr></td>
<td align="center">
10110022
</td>
<td><nobr> T恤 </nobr>
</td>
<td align="left"><nobr>MTWNK57 </nobr>
</td>
<td align="center"><nobr> 32-33 </nobr>
</td>
<td align="right"><nobr>1</nobr></td>
<td align="right"><nobr> 0.00</nobr></td>
<td align="right">
98.00</td>
<td align="right">
882.00</td>
</tr>

<tr height="26">
<td colspan="5"> 总 计:</td>
<td align="right">64</td>
<td align="right">661.32</td>
<td align="right">250.68</td>
<td align="right">448.00</td>
</tr>
<tr>
<td colspan="9"> </td>
</tr>
</table>
</textarea><input type="submit" value="提交">
</form>
</body>
</html>


toExcel.asp内容:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
Response.Expires = 0
Response.ContentType ="application/vnd.ms-excel"
%>
</head>
<body>
<%
Response.Write Request("aaa")
%>
</body>
</html>


为什么运行不正常?
...全文
16 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
patchclass 2003-12-01
  • 打赏
  • 举报
回复
大概是客户端的问题吧
jizhe 2003-12-01
  • 打赏
  • 举报
回复
我的環境是Windows 2000 server +IIS 5.0 + Office 2000
jizhe 2003-12-01
  • 打赏
  • 举报
回复
已经解决了!
ny_nicholas 2003-11-28
  • 打赏
  • 举报
回复
我試了很正常呀
我的環境是Windows 2000 Professional繁體+IIS 5.0 + Office XP
不知道你環境是怎樣的??
我試了五次都正常,都能打開Excel
jizhe 2003-11-28
  • 打赏
  • 举报
回复
不是!有时好用,但经常空白!
shleo 2003-11-28
  • 打赏
  • 举报
回复
是不是显示在一个格子里,有时候还是乱码?
jizhe 2003-11-28
  • 打赏
  • 举报
回复
再加100分!共300分了!
jizhe 2003-11-28
  • 打赏
  • 举报
回复
我试过,不行!
haozhangpk 2003-11-28
  • 打赏
  • 举报
回复
Response.Write Request("aaa")
Response.Write Request。FORM("aaa")
jizhe 2003-11-27
  • 打赏
  • 举报
回复
再加100分!
jizhe 2003-11-27
  • 打赏
  • 举报
回复
问题是有时好用,有时不好用!

如果没有 Response.ContentType ="application/vnd.ms-excel"
这句很正常!

jizhe 2003-11-27
  • 打赏
  • 举报
回复
装了!
tigerwen01 2003-11-27
  • 打赏
  • 举报
回复
你的机器上安装EXCEL应用程序吗?

28,391

社区成员

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

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