ASP+Wrod、excel打印程序示例
<%
filename="test.doc"
'filename="test.xls"
Response.ContentType = "application/msword"
'Response.ContentType = "application/msexcel"
response.AddHeader "content-disposition", "inline; filename=" & filename
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ASP+Wrod、excel打印程序示例</title>
</head>
<body>
<table width="600" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td bgcolor="#CCCCCC">学号</td>
<td bgcolor="#CCCCCC">姓名</td>
<td bgcolor="#CCCCCC">姓别</td>
<td bgcolor="#CCCCCC">出生年月</td>
</tr>
<tr>
<td>111</td>
<td>aaa</td>
<td>true</td>
<td>1983-10-10</td>
</tr>
<tr>
<td>222</td>
<td>aaa</td>
<td>false</td>
<td>1983-10-10</td>
</tr>
<tr>
<td>333</td>
<td>aaa</td>
<td>false</td>
<td>1983-10-10</td>
</tr>
<tr>
<td>444</td>
<td>aaa</td>
<td>true</td>
<td>1983-10-10</td>
</tr>
</table>
</body>
</html>