ASP导出Excel

 

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equtv="Content-Type" content="text/html; charset=gb2312" />
</head>
<%
    Response.ContentType = "application/vnd.ms-excel"
    Response.AddHeader "Content-Disposition", "attachment; filename=IO_123.xls"



    Response.Write "   <div align=""center""><font size=""5"">1</font></div> "
    Response.Write "<table border=""1"" bordercolor=""#999999"" style=""border-collapse: collapse"">"
    Response.Write "<tr bgcolor=""#f1f3f5"">" & vbCrlf
    Response.Write "    <td align=""center"">2</td>" & vbCrlf
    Response.Write "    <td align=""center"">3</td>" & vbCrlf
    Response.Write "    <td align=""center"">4</td>" & vbCrlf
    Response.Write "    <td align=""center"">5</td>" & vbCrlf
    Response.Write "    <td align=""center"">6</td>" & vbCrlf
    Response.Write "    <td align=""center"">7</td>" & vbCrlf
    Response.Write "    <td align=""center"">8</td>" & vbCrlf
    Response.Write "</tr>" & vbCrlf
 

%>
</html>

 

posted on 2013-04-30 11:01  风林幻海  阅读(127)  评论(0编辑  收藏  举报

导航