aspµ¼³öexcel¶þ
<!--#include file=common.asp-->
<%
'**********************************************
' code by aspµ¼³öexcelͨÓÃ
' ÐÞ¸ÄÒýÓà by ×ÓÑÔ(jastudio)
' qq:23638564 email:kpggdf@163.com
' web:www.gdsspt.com
'**********************************************
dim xibua
dim mysql
xibua = request.querystring("ids")
if xibua="all" then
mysql = "select * from singup"
else
mysql = "select * from singup where [ϵ²¿]='"&xibua&"'"
end if
server.scripttimeout=100000 '´¦Àíʱ¼ä½Ï³¤£¬ÉèÖÃÖµÓ¦´óÒ»µã
on error resume next
set objexcelapp = createobject("excel.application")
objexcelapp.displayalerts = false
objexcelapp.application.visible = false
objexcelapp.workbooks.add
set objexcelbook = objexcelapp.activeworkbook
set objexcelsheets = objexcelbook.worksheets
set objspreadsheet = objexcelbook.sheets(1)
dim objrs
set objrs = server.createobject("adodb.recordset")
objrs.open mysql,conn,1,3
if objrs.eof then
response.write("error")
respose.end
end if
dim objfield, icol, irow
icol = 1 'È¡µÃÁкÅ
irow = 1 'È¡µÃÐкÅ
objspreadsheet.cells(irow, icol).value = ""&xibua&"²¿µÄ±¨ÃûÇé¿ö" 'µ¥Ôª¸ñ²åÈëÊý¾Ý
objspreadsheet.columns(icol).shrinktofit=true 'É趨ÊÇ·ñ×Ô¶¯ÊÊÓ¦±í¸ñµ¥Ôª´óС(µ¥Ôª¸ñ¿í²»±ä£©
'ÉèÖÃexcel±íÀïµÄ×ÖÌå
objspreadsheet.cells(irow, icol).font.bold = true 'µ¥Ôª¸ñ×ÖÌå¼Ó´Ö
objspreadsheet.cells(irow, icol).font.italic = false 'µ¥Ôª¸ñ×ÖÌåÇãб
objspreadsheet.cells(irow, icol).font.size = 20 'ÉèÖõ¥Ôª¸ñ×ÖºÅ
objspreadsheet.cells(irow, icol).paragraphformat.alignment=1 'ÉèÖõ¥Ôª¸ñ¶ÔÆë¸ñʽ:¾ÓÖÐ
objspreadsheet.cells(irow,icol).font.name="ËÎÌå" 'ÉèÖõ¥Ôª¸ñ×ÖÌå
objspreadsheet.cells(irow,icol).font.colorindex=2 'ÉèÖõ¥Ôª¸ñÎÄ×ÖµÄÑÕÉ«£¬ÑÕÉ«¿ÉÒÔ²éѯ£¬2Ϊ°×É«
objspreadsheet.range("a1:f1").merge 'ºÏ²¢µ¥Ôª¸ñ(µ¥ÔªÇøÓò)
objspreadsheet.range("a1:f1").interior.colorindex = 1 'Éè¼Æµ¥ÔªÂç±³¾°É«
'objspreadsheet.range("a2:f2").wraptext=true 'ÉèÖÃ×Ö·û»Ø¾í£¨×Ô¶¯»»ÐУ©
irow=irow+1
for each objfield in objrs.fields
'objspreadsheet.columns(icol).shrink
Ïà¹ØÎĵµ£º
<%
Private Const BITS_TO_A_BYTE = 8
Private Const BYTES_TO_A_WORD = 4
Private Const BITS_TO_A_WORD = 32
Private m_lOnBits(30)
Private m_l2Power(30)
Private Function LShift(lValue, iShiftBits)
If iShiftBits = 0 Then
LShift = lValue
Exit Function
ElseIf iShiftBi ......
ASPÓëActiveX¿Ø¼þ½»»¥ÊµÕ½(Ò»)
¹Ø¼ü×Ö:ASP,ActiveX¿Ø¼þ,Êý×ÖÇ©Ãû,°²È«
ActiveX¿Ø¼þÔËÐÐÔÚ¿Í»§¶Ë¡£ÎÒÃÇ¿ÉÒÔ»ñµÃ¿Í»§¶ËµÄһЩÐÅÏ¢£¬ÈçIC¿¨µÄÐÅÏ¢,¿Í»§¶ËµÄÑéÖ¤µÈµÈ¡£µ«ÊÇActiveX¿Ø¼þÒ²ÓÐÐí¶àȱµã£º¿Í»§¶ËµÄ²¿ÊðºÜÀ§ÄÑ£¬Èç¿Í»§¶Ë²»ÄÜÕýÈ·ÏÂÔØ£¬ÏÂÔØÁË ......
Array()
¡¡¡¡FUNCTION: ·µ»ØÒ»¸öÊý×é
¡¡¡¡SYNTAX: Array(list)
¡¡¡¡ARGUMENTS: ×Ö·û£¬Êý×Ö¾ù¿É
¡¡¡¡EXAMPLE: <%
¡¡¡¡Dim myArray()
¡¡¡¡For i = 1 to 7
¡¡¡¡Redim Preserve myArray(i)
¡¡¡¡myArray(i) = WeekdayName(i)
¡¡¡¡Next
¡¡¡¡%[/IMG]
¡¡¡¡RESULT: ½¨Á¢ÁËÒ»¸ö°üº¬7¸öÔªËØµÄÊý×émyArray
¡ ......
´ó¼ÒÓÐÅöµ½¹ýÒªÏëȡһ×Ö·û´®ÀïµÄijЩֵ¶øÎÞ´ÓÏÂÊÖ£¿ÓÐûÓоõµÃ¿´Êé»ò½Ì²Ä¶ÔsplitµÄд·¨ºýÀïºýÍ¿……Èç¹ûÓдËÒÉÎʵϰ£¬Çë¿´ÏÂÃæÎÒ¶ÔÀý×ӵĽâÊÍ£¬ÏàÐÅÄú»á¶ÔÕâ¸öÓÐÒ»¶¨µÄÁ˽⡣
ÎÒÏȽéÉÜÒ»ÏÂSplitº¯ÊýµÄÓ÷¨:
·µ»ØÖµÊý×é = Split("×Ö·û´®","·Ö¸î·û")
¼ÙÉè±äÁ¿strURL±£´æ×ÅURLÖµ£¬ÈçstrURL = "ftp://username ......
ASPÀà
£½£½£½£½£½£½£½£½£½
ʹÓÃVBSµÄASPÒ²Äܶ¨ÒåÀàµÄ£¡±¾ÎĽ«½éÉܶ¨Ò塢ʹÓÃÀàµÄ»ù±¾·½·¨¡£
ÔÚASP£¨ÌØÖ¸Ê¹ÓÃVBSµÄASP£¬ÏÂͬ£©ÀʹÓÃClassÓï¾äÀ´ÉùÃ÷Ò»¸öÀà¡£Óï·¨ÈçÏ£º
Class ˈ̞
End Class
ÀàµÄ¶¨Òå¡¢±äÁ¿¡¢ÊôÐԺͷ½·¨µÈ¶¼°üº¬ÔÚClass...End Class¿éÖС£
ÏÂÃæ¾Í¿ÉÒÔ¶¨ÒåÀàµÄÊôÐԺͷ½·¨ÁË¡£Õýʽ½²ÊôÐÔ¡¢·½·¨µ ......