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
Ïà¹ØÎĵµ£º
¡¡¡¡ÔÚ±àдASP³ÌÐòµÄʱºò£¬Í¨³£¶¼»áÓõ½<!--#include virtual|file="path/filename"-->°ÑÒ»¶ÎÏà¶Ô¶ÀÁ¢µÄÎļþ´úÂëǶÌ×µ½µ±Ç°Ò³ÃæÖÐÀ´¡£ÔÚʵ¼ÊµÄʹÓÃÖкܶàÈ˶Ô"file"ºÍ"virtual"µÄʹÓò»Ì«Àí½â£¬µ¼ÖÂÒ³ÃæÖ´ÐеÄʱºò»á³öÏÖ´íÎó¡£Ï־͸ÃÎÊÌâ×÷Ò»¸ö¼òÊö¡£
¡¡¡¡Ê¹ÓÃ"file"µÄʱºò£¬µÈºÅºóÃæʹÓõÄÊÇÏà¶Ô·¾¶¡£ËùνÏච......
ASP.NET µÇ¼¿Ø¼þΪ ASP.NET Web Ó¦ÓóÌÐòÌṩÁËÒ»ÖÖ¿É¿¿µÄ¡¢ÎÞÐè±à³ÌµÄµÇ¼½â¾ö·½°¸¡£Ä¬ÈÏÇé¿öÏ£¬µÇ¼¿Ø¼þÓë ASP.NET ³ÉÔ±×ʸñºÍ Forms Éí·ÝÑéÖ¤¼¯³É£¬ÒÔ°ïÖúʵÏÖÍøÕ¾µÄÓû§Éí·ÝÑéÖ¤¹ý³ÌµÄ×Ô¶¯»¯¡£
ĬÈÏÇé¿öÏ£¬ASP.NET µÇ¼¿Ø¼þÒÔ´¿Îı¾ÐÎʽ¹¤×÷ÓÚ HTTP ÉÏ¡£Èç¹ûÄú¶Ô°²È«ÐÔÊ®·Ö ......
Ò». Ora-24801:ÔÚOCI_lobº¯ÊýÖзǷ¨µÄ²ÎÊýÖµ
°ÑÒ»Õź¬ÓГ±¸×¢”×ֶεıíͨ¹ýODBCµ¼³öµ½OracleµÄʱºòÒ»Ö±³öÏÖÈçÉÏͼËùʾµÄÌáʾÐÅÏ¢¡£³¢ÊÔÈ¥µôÏà¹Ø×Ö¶ÎÖпոñ×Ö·û£¬È¥µô×Ö¶ÎΪ¿ÕµÄ¼Ç¼£¬»¹Êǵ¼³öʧ°Ü¡£×îºóżȻ·¢ÏÖ£¬ÖØн¨Ò»ÕÅÏàͬ½á¹¹µÄ¿Õ±í£¬È»ºó¸´ÖÆÔ±íµÄ¼Ç¼£¬ÔÙÕ³Ìùµ½Ð±íÖУ¬µ¼³öµ½Oracle¾ ......
ASPÍøÕ¾³ÌÐòÔÚ¹úÄÚÔËÓúܹã,µ«ÊÇÀàËÆÓÚ im286.asp?id=20050307213811ÕâÑùµÄURLÓе㲻ÀûÓÚËÑË÷ÒýÇæµÄÊÕ¼,Ò²¾ÍÊÇ˵²»·ûºÏÓѺÃURL(URLs- Friendly)µÄ±ê×¼,ÄÇôÎÒÃÇÓÃISAPI_Rewrite´òÔìÒ»¸öClean URL,
1.ÏÂÔØISAPI_Rewrite.ISAPI_Rewrite ·Ö¾«¼ò(Lite)ºÍÍêÈ«(Full)°æ.¾«¼ò°æ²»Ö§³Ö¶Ôÿ¸öÐéÄâÖ÷»úÕ¾µã½øÐÐÖØд,Ö»ÄܽøÐÐÈ«¾Ö´¦À ......
<%
'ÈÕÆÚº¯Êý°üDataPackage
%>
<script language="javascript">
function IsDateString(Str)
<!--
{
// УÑéÊÇ·ñYYYY-MM-DD¸ñʽµÄÈÕÆÚÐÍÊý¾Ý£¬·µ»ØֵΪTrue³É¹¦£¬·ñÔò·µ»ØFalse
// Èç¹û´«µÝµÄÊÇ¿Õ×Ö·û´®Ôò·µ»ØFalse
// ¶¨Òå·Ö¸ô·û
var sSplit="-"
var iYearPos=Str.indexOf(sSplit);
if (iYearP ......