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 IsNumber(str)
if RegPatrn("^-?[1-9]\d*$",str) or RegPatrn("^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$",str) then
IsNumber=true
else
IsNumber=false
end if
end function
'ÕýÔò±í´ïʽÅжÏÊÇ·ñÆ¥Åä
Function RegPatrn(patrn, strng)
RegPatrn = false
Di ......
Ò»¡¢asp.netÖе¼³öExeclµÄ·½·¨£º
ÔÚasp.netÖе¼³öExeclÓÐÁ½ÖÖ·½·¨£¬Ò»ÖÖÊǽ«µ¼³öµÄÎļþ´æ·ÅÔÚ·þÎñÆ÷ij¸öÎļþ¼ÐÏÂÃ棬Ȼºó½«ÎļþµØÖ·Êä³öÔÚä¯ÀÀÆ÷ÉÏ£»Ò»ÖÖÊǽ«ÎļþÖ±½Ó½«ÎļþÊä³öÁ÷д¸øä¯ÀÀÆ÷¡£ÔÚResponseÊä³öʱ£¬t·Ö¸ôµÄÊý¾Ý£¬µ¼³öexeclʱ£¬µÈ¼ÛÓÚ·ÖÁУ¬nµÈ¼ÛÓÚ»»ÐС£
1¡¢½«Õû¸öhtmlÈ«²¿Êä³öexecl
´Ë·¨½«htmlÖÐËùÓеÄÄÚ ......
ASPÓëActiveX¿Ø¼þ½»»¥ÊµÕ½(Ò»)
¹Ø¼ü×Ö:ASP,ActiveX¿Ø¼þ,Êý×ÖÇ©Ãû,°²È«
ActiveX¿Ø¼þÔËÐÐÔÚ¿Í»§¶Ë¡£ÎÒÃÇ¿ÉÒÔ»ñµÃ¿Í»§¶ËµÄһЩÐÅÏ¢£¬ÈçIC¿¨µÄÐÅÏ¢,¿Í»§¶ËµÄÑéÖ¤µÈµÈ¡£µ«ÊÇActiveX¿Ø¼þÒ²ÓÐÐí¶àȱµã£º¿Í»§¶ËµÄ²¿ÊðºÜÀ§ÄÑ£¬Èç¿Í»§¶Ë²»ÄÜÕýÈ·ÏÂÔØ£¬ÏÂÔØÁË ......
ASPÓëJSPµÄ±È½Ï
´Ó΢ÈíÍƳöÁËASP(ActiveServerPage)ºó£¬ËüÒÔÆäÇ¿´óµÄ¹¦ÄÜ£¬¼òµ¥Ò×ѧµÄÌصã¶øÊܵ½¹ã´óWEB¿ª·¢ÈËÔ±µÄϲ»¶¡£µ«ÊÇËüÈ´ÓÐ΢Èí²úÆ·µÄͨ²¡,Ö»ÄÜÔÚWindowsƽ̨ÏÂʹÓã¬ËäÈ»Ëü¿ÉÒÔͨ¹ýÔö¼Ó¿Ø¼þ¶øÔÚLINUXÏÂʹÓ㬵«ÊÇÆ书ÄÜ×îÇ¿´óµÄDCOM¿Ø¼þÈ´²»ÄÜʹÓ᣶øSUN¹«Ë¾ÔÚJAVAµÄ»ù´¡Ï¿ª·¢³öµÄJSP(Java ServerPages)ʵÏÖÁ˶ ......
<%
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 ......