ASP如何实现在线预览DOC和EXCLE文件
发布网友
发布时间:2022-04-25 13:08
我来回答
共2个回答
热心网友
时间:2024-08-05 17:13
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "content-disposition", "inline; filename = ASP_Excel.xls"' "inline; filename = "&request("username")&"_"&request("name")&"的档案.doc"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Untitled Document</title>
</head>
<body>
<p>asgagsah</p>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td width="30%" bgcolor="#CCCCCC">sdafsagsgdsgds</td>
<td bgcolor="#FFFFFF">sdafsagsgdsgdssdafsagsgdsgdssdafsagsgdsgdssdafsagsgdsg<br>
dssdafsagsgdsgdssdafsagsgdsgdssdafsagsgdsgdssdafsagsgdsgdssdafsagsgdsgds</td>
</tr>
<tr>
<td width="30%" bgcolor="#CCCCCC">sdgdsagdsgdsgsd</td>
<td bgcolor="#FFFFFF">sdafsagsgdsgds</td>
</tr>
<tr>
<td width="30%" bgcolor="#CCCCCC"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td width="30%" bgcolor="#CCCCCC">sdgdssdgdsdsg</td>
<td bgcolor="#FFFFFF">sfsafsddsgsd</td>
</tr>
</table>
<p>fsddssadgsa<img src="joyren/images/ADD.JPG" width="12" height="24">dgsdgds<img src="joyren/images/back_green.jpg" width="842" height="50"></p>
<table width="70%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td bgcolor="#CCCCCC">sfsadfsadfdsag</td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC">gasdgsdagsgs</td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC">sdgsddsgsgs</td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC">sdgsdgdsgsgsgdsadgsagsd</td>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
<p> </p>
<p>sdsaddsagsddsgds</p>
</body>
</html>
热心网友
时间:2024-08-05 17:11
用com组件 或者你有server.createobject(doc或者excel)对象的权限 可以直接打开doc或者excel文件