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
Ïà¹ØÎĵµ£º
<%
function decrypt(dcode)
dim texts
dim i
for i=1 to len(dcode)
texts=texts & chr(asc(mid(dcode,i,2))-i)
next
decrypt=texts
end function
function encrypt(ecode)
dim texts
dim i
for i=1 to len(ecode)
texts=texts & chr(asc(mid(ecode,i,2))+i)
next
en ......
ASPÓëJSPµÄ±È½Ï
´Ó΢ÈíÍƳöÁËASP(ActiveServerPage)ºó£¬ËüÒÔÆäÇ¿´óµÄ¹¦ÄÜ£¬¼òµ¥Ò×ѧµÄÌصã¶øÊܵ½¹ã´óWEB¿ª·¢ÈËÔ±µÄϲ»¶¡£µ«ÊÇËüÈ´ÓÐ΢Èí²úÆ·µÄͨ²¡,Ö»ÄÜÔÚWindowsƽ̨ÏÂʹÓã¬ËäÈ»Ëü¿ÉÒÔͨ¹ýÔö¼Ó¿Ø¼þ¶øÔÚLINUXÏÂʹÓ㬵«ÊÇÆ书ÄÜ×îÇ¿´óµÄDCOM¿Ø¼þÈ´²»ÄÜʹÓ᣶øSUN¹«Ë¾ÔÚJAVAµÄ»ù´¡Ï¿ª·¢³öµÄJSP(Java ServerPages)ʵÏÖÁ˶ ......
1¡¢ÔÚÍøվĿ¼ÏÂн¨Ò»¸öÎı¾£ºtxtcounter.txt ÔÚÎı¾Ìîд1»òÆäËûʶ×Ö
2¡¢Ð½¨Ò»aspÎļþ£ºcount.asp£¬¼ÓÈëÒÔÏ´úÂ룺
<%
CountFile=Server.MapPath("txtcounter.txt")
Set FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set Out=FileObject.OpenTextFile(CountF ......
´ó¼ÒÓÐÅöµ½¹ýÒªÏëÈ¡Ò»×Ö·û´®ÀïµÄijЩֵ¶øÎÞ´ÓÏÂÊÖ£¿ÓÐûÓоõµÃ¿´Êé»ò½Ì²Ä¶ÔsplitµÄд·¨ºýÀïºýÍ¿……Èç¹ûÓдËÒÉÎʵĻ°£¬Çë¿´ÏÂÃæÎÒ¶ÔÀý×ӵĽâÊÍ£¬ÏàÐÅÄú»á¶ÔÕâ¸öÓÐÒ»¶¨µÄÁ˽⡣
ÎÒÏȽéÉÜÒ»ÏÂSplitº¯ÊýµÄÓ÷¨:
·µ»ØÖµÊý×é = Split("×Ö·û´®","·Ö¸î·û")
¼ÙÉè±äÁ¿strURL±£´æ×ÅURLÖµ£¬ÈçstrURL = "ftp://username ......