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

aspÉÏ´«excleÎļþ²¢µ¼Èëµ½accessÊý¾Ý¿â

<%
function FSOFileDel(filename)
Dim objFSO,objCountFile,FiletempData
On Error Resume Next
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objCountFile =objFSO.DeleteFile(Server.MapPath(filename),true)
objCountFile.Close
Set objCountFile=Nothing
Set objFSO = Nothing
End Function
dim action,files
action=trim(request("action"))
files=trim(request("files"))
select case action
case "add"
call add(files)
case else
call default()
end select        
%>
<%sub default()%>
<form action="?action=add" method="post" id="form1" name="form1">
<table border="0" cellspacing="0" cellpadding="0">
<tr class="title2">
<td colspan="2">ÅúÁ¿ÉÏ´«</td>
</tr>
<tr>
<td>1.ÉÏ´«ExcleÎļþ&nbsp;</td>
<td><input name="files" type="hidden" id="files" />
<iframe frameborder="0" scrolling="no" height="25" width="400" src="upload.asp?action=add"></iframe>&nbsp;</td>
</tr>
<tr>
<td>2.µã»÷"¿ªÊ¼ÉÏ´«"&nbsp;</td>
<td>  <label>
<input type="submit" name="button" id="button" value="¿ªÊ¼ÉÏ´«" />
</label>&nbsp;</td>
</tr>
</table>
</form>
<%end sub%>
<%
sub add(files)
dim FileName
if files="" then ClientAlert"ÇëÏÈÉÏ´«ExcleÎļþ","?"
FileName="../upload/file/"&files  'È¡µÃÎļþ·¾¶
Dim connEX
set connEX=CreateObject("ADODB.connection")
connEX.Open "Driver={Microsoft Excel Driver (*.xls)};" & _
"DriverId=790;" & _
"Dbq=" & server.mappath(""&FileName&"") & ";" & _
"DefaultDir=G:\"
set rs=createobject("ADODB.recordset")
rs.Open "Select * from [Sheet1$]",connEX, 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=


Ïà¹ØÎĵµ£º

aspµÄ19¸ö»ù±¾¼¼ÇÉ

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.NET ÈçºÎ£º´´½¨ ASP.NET µÇ¼ҳ


      ¿ÉÒÔʹÓà ASP.NET Login ¿Ø¼þ´´½¨µÇ¼ҳ¡£´Ë¿Ø¼þÌáÈ¡Óû§ÃûºÍÃÜÂ룬²¢Ê¹Óà ASP.NET ³ÉÔ±×ʸñºÍ Forms Éí·ÝÑéÖ¤À´ÑéÖ¤Óû§µÄƾ¾Ý²¢´´½¨Éí·ÝÑé֤Ʊ֤¡£
 
1¡¢´´½¨Ò»¸öʹÓà ASP.NET ³ÉÔ±×ʸñµÄ ASP.NET Web Ó¦ÓóÌÐò¡£ÓйØÏêϸÐÅÏ¢ºÍʾÀý£¬Çë²Î¼ûÅäÖà ASP.NET Ó¦ÓóÌÐòÒÔʹÓóÉÔ±×ʸñ ......

ÓÃISAPI_RewriteʵÏÖaspα¾²Ì¬

ASPÍøÕ¾³ÌÐòÔÚ¹úÄÚÔËÓúܹã,µ«ÊÇÀàËÆÓÚ im286.asp?id=20050307213811ÕâÑùµÄURLÓе㲻ÀûÓÚËÑË÷ÒýÇæµÄÊÕ¼,Ò²¾ÍÊÇ˵²»·ûºÏÓѺÃURL(URLs- Friendly)µÄ±ê×¼,ÄÇôÎÒÃÇÓÃISAPI_Rewrite´òÔìÒ»¸öClean URL,
1.ÏÂÔØISAPI_Rewrite.ISAPI_Rewrite ·Ö¾«¼ò(Lite)ºÍÍêÈ«(Full)°æ.¾«¼ò°æ²»Ö§³Ö¶Ôÿ¸öÐéÄâÖ÷»úÕ¾µã½øÐÐÖØÐ´,Ö»ÄܽøÐÐÈ«¾Ö´¦À ......

ASP excelµ¼³ö/µ¼ÈëAccessÊý¾Ý¿â(´úÂë+ʵÀýÏÂÔØ)

Excelµ¼³öº¯Êý
<%
Sub   ExportToExcel    
Response.ContentType   =   "application/vnd.ms-Excel"  
Response.AddHeader   "Content-Disposition",   "attachment;Filename=Results.xls"  
Response.Write  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ