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>

posted @ 2006-06-04 22:43  Winner.Net(2007)  阅读(876)  评论(0编辑  收藏  举报