ASPµ¼³öExcelÊý¾ÝµÄËÄÖÖ·½·¨
Ò»¡¢Ê¹ÓÃOWC
¡¡¡¡Ê²Ã´ÊÇOWC£¿
¡¡¡¡OWCÊÇOffice Web CompentµÄËõд£¬¼´MicrosoftµÄOffice Web×é¼þ£¬ËüΪÔÚWebÖлæÖÆͼÐÎÌṩÁËÁé»îµÄͬʱҲÊÇ×î»ù±¾µÄ»úÖÆ¡£ÔÚÒ»¸öintranet»·¾³ÖУ¬Èç¹û¿ÉÒÔ¼ÙÉè¿Í»§»úÉÏ´æÔÚÌض¨µÄä¯ÀÀÆ÷ºÍһЩ¹¦ÄÜÇ¿´óµÄÈí¼þ£¨ÈçIE5ºÍOffice 2000£©£¬ÄÇô¾ÍÓÐÄÜÁ¦ÀûÓÃOffice Web×é¼þÌṩһ¸ö½»»¥Ê½Í¼Ðοª·¢»·¾³¡£ÕâÖÖģʽÏ£¬¿Í»§¶Ë¹¤×÷Õ¾½«ÔÚÕû¸öÈÎÎñÖзֵ£ºÜ´óµÄ±ÈÖØ¡£
£¼%Option Explicit
Class ExcelGen
Private objSpreadsheet
Private iColOffset
Private iRowOffset
Sub Class_Initialize()
Set objSpreadsheet = Server.CreateObject("OWC.Spreadsheet")
iRowOffset = 2
iColOffset = 2
End Sub
Sub Class_Terminate()
Set objSpreadsheet = Nothing 'Clean up
End Sub
Public Property Let ColumnOffset(iColOff)
If iColOff £¾ 0 then
iColOffset = iColOff
Else
iColOffset = 2
End If
End Property
Public Property Let RowOffset(iRowOff)
If iRowOff £¾ 0 then
iRowOffset = iRowOff
Else
iRowOffset = 2
End If
End Property Sub GenerateWorksheet(objRS)
'Populates the Excel worksheet based on a Recordset's contents
'Start by displaying the titles
If objRS.EOF then Exit Sub
Dim objField, iCol, iRow
iCol = iColOffset
iRow = iRowOffset
For Each objField in objRS.Fields
objSpreadsheet.Cells(iRow, iCol).Value = objField.Name
objSpreadsheet.Columns(iCol).AutoFitColumns
'ÉèÖÃExcel±íÀïµÄ×ÖÌå
objSpreadsheet.Cells(iRow, iCol).Font.Bold = True
objSpreadsheet.Cells(iRow, iCol).Font.Italic = False
objSpreadsheet.Cells(iRow, iCol).Font.Size = 10
objSpreadsheet.Cells(iRow, iCol).Halignment = 2 '¾ÓÖÐ
iCol = iCol + 1
Next 'objField
'Display all of the data
Do While Not objRS.EOF
iRow = iRow + 1
iCol = iColOffset
For Each objField in objRS.Fields
If IsNull(objField.Value) then
objSpreadsheet.Cells(iRow, iCol).Value = ""
Else
objSpreadsheet.Cells(iRow, iCol).Value = objField.Value
objSpreadsheet.Columns(iCol).AutoFitColumns
objSpreadsheet.Cells(iRow, iCol).Font.Bold = False
objSpreadsheet.Cells(iRow, iCol).Font.Italic = F
Ïà¹ØÎĵµ£º
dataurl=Server.MapPath("menutree.mdb")'Êý¾Ý¿âµØÖ·
dim conn,strQuery,rs
set conn = server.CreateObject("adodb.connection")
conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE="&dataurl
strQuery="select * from menufun"
set rs=server.createobject("adodb.recordset")
rs.open strQuery,conn,1 ......
ΪÁËʹÓû§Äܹ»µÇ¼ʹÓà ASP.NET ³ÉÔ±×ʸñ£¨Forms Éí·ÝÑéÖ¤£©½øÐÐÓû§Éí·ÝÑéÖ¤µÄ ASP.NET Ó¦ÓóÌÐò£¬¿ÉÒÔʹÓà LoginStatus ¿Ø¼þ¡£LoginStatus ¿Ø¼þ¼ì²âÓû§µÄÉí·ÝÑé֤״̬¡£Èç¹ûÓû§Î´¾¹ýÉí·ÝÑéÖ¤£¬¸Ã¿Ø¼þ½«ÏÔʾһ¸ö°´Å¥£¬Òýµ¼Óû§½øÈëÓ¦ÓóÌÐòµÄµÇ¼ҳ¡£Èç¹ûÓû§ÒѾ¹ýÉí·ÝÑéÖ¤£¬LoginStatus ¿Ø¼þ½«ÏÔʾһ¸ö°´Å¥£¬Óû§¿ ......
±¾½ÚÖеÄÖ÷ÌâÃèÊöÈçºÎʹÓà Visual Web Developer ¹¤¾ßÏäµÄ“HTML”Ñ¡ÏÉ쵀 ASP.NET Web ·þÎñÆ÷¿Ø¼þ¡£
ĬÈÏÇé¿öÏ£¬·þÎñÆ÷ÎÞ·¨Ê¹Óà ASP.NET ÍøÒ³É쵀 HTML ÔªËØ£»ÕâЩԪËر»ÊÓΪ´«µÝ¸øä¯ÀÀÆ÷µÄ²»Í¸Ã÷Îı¾¡£µ«ÊÇ£¬Í¨¹ý½« HTML ÔªËØת»»³É HTML ·þÎñÆ÷¿Ø¼þ£¬¿ÉÒÔ½«ËüÃǹ«¿ªÎª ......
ASPÍøÕ¾³ÌÐòÔÚ¹úÄÚÔËÓúܹã,µ«ÊÇÀàËÆÓÚ im286.asp?id=20050307213811ÕâÑùµÄURLÓе㲻ÀûÓÚËÑË÷ÒýÇæµÄÊÕ¼,Ò²¾ÍÊÇ˵²»·ûºÏÓѺÃURL(URLs- Friendly)µÄ±ê×¼,ÄÇôÎÒÃÇÓÃISAPI_Rewrite´òÔìÒ»¸öClean URL,
1.ÏÂÔØISAPI_Rewrite.ISAPI_Rewrite ·Ö¾«¼ò(Lite)ºÍÍêÈ«(Full)°æ.¾«¼ò°æ²»Ö§³Ö¶Ôÿ¸öÐéÄâÖ÷»úÕ¾µã½øÐÐÖØд,Ö»ÄܽøÐÐÈ«¾Ö´¦À ......
<%
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
En ......