将网页表格里的数据导出到Excel表格

发布时间:2007年12月02日      浏览次数:1939 次
<%
response.ContentType ="application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=将网页表格里的数据导出到Excel表格"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body,td{font-size:12px;}
-->
</style>
</head>
<body>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bordercolordark="#FFFFFF">
<tr>
<td width="80" height="22" nowrap> <div align="center"><b>标题</b></div></td>
<td width="80" nowrap><div align="center"><b>标题</b></div></td>
<td width="80" nowrap><div align="center"><b>标题</b></div></td>
<td width="80" nowrap><div align="center"><b>标题</b></div></td>
<td width="80" nowrap><div align="center"><b>标题</b></div></td>
</tr>
<tr>
<td height="22" nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
</tr>
<tr>
<td height="22" nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
</tr>
<tr>
<td height="22" nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
</tr>
<tr>
<td height="22" nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
<td nowrap><div align="center">数据</div></td>
</tr>
</table>
</body>
</html>
文章来源:桂林唯创网络
免责声明:本站相关技术文章信息部分来自网络,目的主要是传播更多信息,如果您认为本站的某些信息侵犯了您的版权,请与我们联系,我们会即时妥善的处理,谢谢合作!