Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp½«tableÉú³ÉexcelÎļþxls

 <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
if request("action")=1 then
 Response.ContentType="application/ms-excel"
 Response.AddHeader "content-disposition","attachment;filename=www.xls"
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ</title>
<style type="text/css">
table {
 border-top:1px solid #003399;
 border-left:1px solid #003399;
}
td {
 border-right:1px solid #003399;
 border-bottom:1px solid #003399;
}
thead {
 background-color:#000066;
 font-weight:bold;
 padding:5px;
 color:#FFFFFF;
}
</style>
<script  language="javascript"> 
function  tableToExcel(){
 location.href='?action=1';

</script>
</head>
<body>
<input type="button" value="µ¼³öÊý¾Ý" onclick="tableToExcel()" />
<%
ConnStr="..." 
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
set rs = server.CreateObject("adodb.recordset")
rs.open "select top 10 * from [ÄãµÄ±íÃû]",conn,1,1
if not (rs.eof and rs.bof) then
 column = rs.fields.count
 response.Write("<table cellpadding='0' cellspacing='0'>")
 response.Write("<thead><td>ÐòºÅ</td>")
 for each f in rs.fields
  response.Write("<td>" & f.name & "</td>")
 next
 response.Write("</thead>")
 for j = 1 to rs.recordcount
  if j > 5 then 'ÔÚµÚÎåÌõµÄʱºòÒþ²ØÊý¾Ý,¾­¹ý²âÊÔÈç¹ûÊÇdisplayΪnoneµÄÊý¾ÝÊDz»»áµ¼³öÀ´µÄ
   response.Write("<tr style='display:none'>")
  else
   response.Write("<tr>")
  end if
  response.Write("<td>" & j &


Ïà¹ØÎĵµ£º

asp»ñÈ¡ÉÏÒ»Ò³µØÖ·µÄ·½·¨

<%
If Request.ServerVariables("HTTP_REFERER")<>"" Then
      tmpstr=Request.ServerVariables("HTTP_REFERER")
Else
     tmpstr="index.htm"
End If
response.Redirect(tmpstr)
%>
´úÂë½âÊÍ£º
Request.ServerVariables("HTTP_REFERER")ÊÇ»ñÈ¡ÉÏÒ ......

aspºÍmysql·ÖÒ³´úÂë

 <!--#include file="zheboconn.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>aspºÍmysql·ÖÒ³´úÂë</title>
<style type="text/css">
<!--
.STYLE3 {
 fon ......

ÓÃASPʵÏÖSQL SERVERÊý¾Ý¿âµÄÔ¶³Ì¸üÐÂ

ÓÃASPʵÏÖSQL SERVERÊý¾Ý¿âµÄÔ¶³Ì¸üÐÂ
½­ËÕʡͨÖÝÖ°Òµ¸ß¼¶ÖÐѧ  Áõ¼Æºâ
΢ÈíµÄSQL Server ÊÇÒ»¸ö´óÐ͵ĹØÏµÊý¾Ý¿âϵͳ£¬ËüΪÔÚ¸´ÔÓ»·¾³ÏÂÓÐЧµØÊµÏÖÖØÒªÉÌÒµÓ¦ÓÃÌṩÁËÒ»¸öÇ¿ÓÐÁ¦µÄ¿Í»§/·þÎñÆ÷ƽ̨¡£Ëü½áºÏMicrosoft Windows NT²Ù×÷ϵͳµÄÄÜÁ¦£¬ÌṩÁËÒ»¸ö°²È«¡¢¿ÉÀ©Õ¹¡¢Ò×¹ÜÀí¡¢¸ß¶ËÐÔÄܵĿͻ§/·þÎñÆ÷Êý¾Ý¿âƽ̨¡£Õ ......

¶¯Ì¬ÍøÒ³¿ª·¢——ASPÁ¬½ÓSQL2005Êý¾Ý¿â

 ¶¯Ì¬ÍøÒ³¿ª·¢——ASPÁ¬½ÓSQL2005Êý¾Ý¿â
˵Ã÷£ºa¡¢ÒÔÏÂ×Ö·ûÖÐÊý¾Ý¿âÃûforum£¬Êý¾Ý¿â·þÎñÆ÷ÃûWWW-2443D34E558\SQL2005£¨»òÕß127.0.0.1£©
b¡¢²é¿´sqlÊý¾Ý¿â·þÎñÆ÷Ãû³Æ£º¶ÔÏó×ÊÔ´¹ÜÀíÆ÷->Êý¾Ý¿â->ÓÒ¼üµã»÷×Ô¼º½¨µÄÊý¾Ý¿â->ÊôÐÔ->ȨÏÞ
c¡¢Provider=sqlncliÒ²¿ÉÒÔ,UIDÓë“=”Ö®¼ä²»¿ÉÒÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ