ASP excelµ¼³ö/µ¼ÈëAccessÊý¾Ý¿â(´úÂë+ʵÀýÏÂÔØ)
Excelµ¼³öº¯Êý
<%
Sub ExportToExcel
Response.ContentType = "application/vnd.ms-Excel"
Response.AddHeader "Content-Disposition", "attachment;Filename=Results.xls"
Response.Write "<body>"
Response.Write "<table border=1>"
Call WriteTableData
Response.Write "</table>"
Response.Write "</body>"
Response.Write "</html>"
End Sub
%>
Excelµ¼ÈëÊý¾Ý¿â
<%
dim FileName
FileName="Excel.xls" 'È¡µÃÎļþÃû£¬À´×ÔÏîÄ¿¾ÀíµÄÖ¸¶¨£¬Â·¾¶¹Ì¶¨ÔÚij¸öÐéÄâ·¾¶ÖÐ
Dim conn, rs
set conn=CreateObject("ADODB.connection")
conn.Open "Driver={Microsoft Excel Driver (*.xls)};" & _
"DriverId=790;" & _
"Dbq=" & Server.mappath(""&FileName&"") & ";" & _
"DefaultDir=G:\"
set rs=createobject("ADODB.recordset")
rs.Open "Select * from [Sheet1$]",conn, 2, 2
if rs.eof then
response.write "Excel±íÖÐÎ޼ͼ"
else
set connDB = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("Excel.mdb")
'RESPONSE.WRITE DBpath
connDB.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set RsDB = Server.CreateObject("ADODB.Recordset")
SQLDB="Select * from Excel"
RsDB.open SQLDB,connDB,1,3
do while not rs.eof 'ÀûÓÃÑ»·¶Á³öÊý¾Ý
RsDB.addnew
RsDB("filename")=rs(0)
RsDB("id1")=rs(1)
RsDB("id2")=rs(2)
RsDB("id3")=rs(3)
RsDB("id4")=rs(4)
Rs.update
RsDB.movenext
rs.movenext
loop
'response.redirect FileName
end if
RsDB.movefirst
if RsDB.eof then
response.write "Êý¾Ý¿âÖÐÎ޼Ǽ"
else
do while not RsDB.EOF
response.write RsDB("filename")&" "
response.write RsDB("id1")&" "
response.write RsDB("id2")&" "
response.write RsDB("id3")&" "
response.write RsDB("id4")&" "
re
Ïà¹ØÎĵµ£º
1. ÏÖÔÚµÄÈÕÆÚʱ¼äÃüÁîÊÇ <%=now%> ¼´¿É
2.ASPÈ¡µÃ±í¸ñ(from)Êý¾ÝÊäÈëµÄ·½·¨£¬ÊÇʹÓÃÒ»¸öÄÚÖõĶÔÏó(object)—Requect, ËüÒÔget,post¶øÒì¡£
3.ÈôÒª×Ô¼ºÓÃVB»òÆäËüÓïÑÔ±àд£¬.dllÎļþ¹©ASPʹÓÃÐ轫DLLÎļþ×¢²á·½¿É£ºDOSÏÂÊäÈë regsbr32 *.dll
4.ÏÔʾÎå¸öÖظ´µÄ¾ä×Ó£¬×ÖÌåÔ½À´Ô½´ó <% for i=1 to 5 %> &l ......
»¨ÁËÁ½¸öÍíÉÏ°ïÅóÓѽ«Ò»¸öasp¿ª·¢µÄÍøÕ¾´ÓACCESSÊý¾Ý¿âתÏòSQL SERVER 2000. ÍøÉϲéÁËЩ×ÊÁÏ£¬¼ÓÉÏ×Ô¼ºµÄ¾Àú£¬×ܽ᣺
1¡¢Ê×ÏÈ¿´asp µÄ³ÌÐòÖÐÊÇ·ñÓÐ on error resume next; Èç¹ûÓÐ,ÏÈ×¢Ê͵ô¡£·ñÔòºÜ¶à´íÎóÎÞ·¨±©Â¶³öÀ´
2¡¢´´½¨SQL SERVER Êý¾Ý±í¡£ ʹÓÃSQL SERVER 2000×Ô´øµÄÊý¾Ýµ¼ÈëÏòµ¼£¬½«ACCESSÊý¾Ý¿âÖеıí½á¹¹£¬ÒÔ¼ ......
¿ÉÒÔʹÓà ASP.NET Login ¿Ø¼þ´´½¨µÇ¼ҳ¡£´Ë¿Ø¼þÌáÈ¡Óû§ÃûºÍÃÜÂ룬²¢Ê¹Óà ASP.NET ³ÉÔ±×ʸñºÍ Forms Éí·ÝÑéÖ¤À´ÑéÖ¤Óû§µÄƾ¾Ý²¢´´½¨Éí·ÝÑé֤Ʊ֤¡£
1¡¢´´½¨Ò»¸öʹÓà ASP.NET ³ÉÔ±×ʸñµÄ ASP.NET Web Ó¦ÓóÌÐò¡£ÓйØÏêϸÐÅÏ¢ºÍʾÀý£¬Çë²Î¼ûÅäÖà ASP.NET Ó¦ÓóÌÐòÒÔʹÓóÉÔ±×ʸñ ......
ASPÍøÕ¾³ÌÐòÔÚ¹úÄÚÔËÓúܹã,µ«ÊÇÀàËÆÓÚ im286.asp?id=20050307213811ÕâÑùµÄURLÓе㲻ÀûÓÚËÑË÷ÒýÇæµÄÊÕ¼,Ò²¾ÍÊÇ˵²»·ûºÏÓѺÃURL(URLs- Friendly)µÄ±ê×¼,ÄÇôÎÒÃÇÓÃISAPI_Rewrite´òÔìÒ»¸öClean URL,
1.ÏÂÔØISAPI_Rewrite.ISAPI_Rewrite ·Ö¾«¼ò(Lite)ºÍÍêÈ«(Full)°æ.¾«¼ò°æ²»Ö§³Ö¶Ôÿ¸öÐéÄâÖ÷»úÕ¾µã½øÐÐÖØд,Ö»ÄܽøÐÐÈ«¾Ö´¦À ......