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µ¼³öExcelÊý¾ÝµÄËÄÖÖ·½·¨
À´Ô´£º aspsky ×÷Õߣº tonny
¡¡¡¡Ò»¡¢Ê¹ÓÃOWC
¡¡¡¡Ê²Ã´ÊÇOWC£¿
¡¡¡¡OWCÊÇOffice Web CompentµÄËõд£¬¼´MicrosoftµÄOffice Web×é¼þ£¬ËüΪÔÚWebÖлæÖÆÍ¼ÐÎÌṩÁËÁé»îµÄͬʱҲÊÇ×î»ù±¾µÄ»úÖÆ¡£ÔÚÒ»¸öintranet»·¾³ÖУ¬Èç¹û¿ÉÒÔ¼ÙÉè¿Í»§»úÉÏ´æÔÚÌØ¶¨µÄä¯ÀÀÆ÷ºÍһЩ¹ ......
<%
Call RemoveAllCache()
Sub RemoveAllCache()
Dim cachelist,i
Call InnerHtml("UpdateInfo","<b>¿ªÊ¼Ö´ÐÐÇåÀíµ±Ç°Õ¾µã»º´æ</b>£º")
Cachelist=split(GetallCache(),",")
If UBound(cachelist)>1 Then
For i=0 to UBound(cachelist)-1
DelCahe Cachelist(i)
Call InnerHtml("UpdateInf ......
̽Ë÷Èí¼þ¹¤×÷ÊÒ³¤ÆÚרҵ³Ð½ÓÖÐСÐÍÉÌÒµÈí¼þ»òÍøÕ¾£¬×îÓŻݵļ۸ñºÍ¸ßÖÊÁ¿µÄ·þÎñÆÚ´ýÄúµÄ»Ý¹Ë£¡
±¾¹¤×÷ÊÒ³Ð½Ó JSP ASP VB PB LotusNotes µÈÓïÑÔÒªÇóµÄÓ¦ÓÃϵͳ¿ª·¢ÒµÎñ
java jspʵսԴ³ÌÐò´úÂë:
......
Á¬½Ó´úÂë1Ö±½ÓÊäÈë
<%
Dim my_conn, sql,rs
Set my_conn = createobject("ADODB.Connection")
my_conn.open = "DRIVER={MySQL ODBC 3.51 Driver};"_
& "SERVER=localhost;"_ '·þÎñÆ÷Ãû
& "DATABASE=mybase;"_ 'Êý¾Ý¿âÃû
& "UID=root;PWD=111; OPTION=35;" 'Óû§ÃûºÍÃÜÂë
Set rs = Server.Crea ......