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
Ïà¹ØÎĵµ£º
5¡¢´¿ASP´úÂëÉú³Éͼ±íº¯Êý——Á¢Ìå±ýͼ
<%dim total(7,1)
total(1,0)="Öйú¾Óª±¨"
total(2,0)="ÕÐÆ¸Íø"
total(3,0)="51Job"
total(4,0)="ÐÂÃñÍí±¨"
total(5,0)="ÐÂÎÅÍí±¨"
total(6,0)="ÄÏ·½ÖÜÄ©"
total(7,0)="Ñò³ÇÍí±¨"
total(1,1)=200
total(2,1)=1200
total(3,1)=900
total(4,1)=600
total(5, ......
<%
Set fso = CreateObject("Scripting.FileSystemObject")
Set fldr = fso.GetFolder("c:\Program Files")
Response.Write "¸¸Îļþ¼ÐÃû×ÖÊÇ£º" & fldr & "<br>"
If fldr.IsRootFolder = True Then
Response.Write "¸ÃÎļþ¼ÐÊÇÒ»¸ùÎļþ¼Ð" & "<br>"
Else
Resp ......
<%
Function gen_key(digits)
'Create and define array
dim char_array(50)
char_array(0) = "0"
char_array(1) = "1"
char_array(2) = "2"
char_array(3) = "3"
char_array(4) = "4"
char_array(5) = "5"
char_array(6) = "6"
char_array(7) = "7"
char_array(8) = "8"
char_array(9) = "9"
char_array( ......
ASPÀà
£½£½£½£½£½£½£½£½£½
ʹÓÃVBSµÄASPÒ²Äܶ¨ÒåÀàµÄ£¡±¾ÎĽ«½éÉܶ¨Ò塢ʹÓÃÀàµÄ»ù±¾·½·¨¡£
ÔÚASP£¨ÌØÖ¸Ê¹ÓÃVBSµÄASP£¬ÏÂͬ£©ÀʹÓÃClassÓï¾äÀ´ÉùÃ÷Ò»¸öÀà¡£Óï·¨ÈçÏ£º
Class ˈ̞
End Class
ÀàµÄ¶¨Òå¡¢±äÁ¿¡¢ÊôÐԺͷ½·¨µÈ¶¼°üº¬ÔÚClass...End Class¿éÖС£
ÏÂÃæ¾Í¿ÉÒÔ¶¨ÒåÀàµÄÊôÐԺͷ½·¨ÁË¡£Õýʽ½²ÊôÐÔ¡¢·½·¨µ ......