Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

3¡¢´¿ASP´úÂëÉú³Éͼ±íº¯Êý——ÕÛÏßͼ

3¡¢´¿ASP´úÂëÉú³Éͼ±íº¯Êý——ÕÛÏßͼ
<%dim total(7,3)
total(1,0)="Öйú¾­Óª±¨"
total(2,0)="ÕÐÆ¸Íø"
total(3,0)="51Job"
total(4,0)="ÐÂÃñÍí±¨"
total(5,0)="ÐÂÎÅÍí±¨"
total(6,0)="ÄÏ·½ÖÜÄ©"
total(7,0)="Ñò³ÇÍí±¨"
total(0,1)="#FF0000,1.5,1,2,¹«Ë¾1"'²ÎÊý1ÏßÌõµÄÑÕÉ«£¬²ÎÊý2ÏßÌõµÄ¿í¶È£¬²ÎÊý3Ï ......

asp µ¼Èëµ¼³öEXCEL

Ò»¡¢asp.netÖе¼³öExeclµÄ·½·¨£º
ÔÚasp.netÖе¼³öExeclÓÐÁ½ÖÖ·½·¨£¬Ò»ÖÖÊǽ«µ¼³öµÄÎļþ´æ·ÅÔÚ·þÎñÆ÷ij¸öÎļþ¼ÐÏÂÃæ£¬È»ºó½«ÎļþµØÖ·Êä³öÔÚä¯ÀÀÆ÷ÉÏ£»Ò»ÖÖÊǽ«ÎļþÖ±½Ó½«ÎļþÊä³öÁ÷д¸øä¯ÀÀÆ÷¡£ÔÚResponseÊä³öʱ£¬t·Ö¸ôµÄÊý¾Ý£¬µ¼³öexeclʱ£¬µÈ¼ÛÓÚ·ÖÁУ¬nµÈ¼ÛÓÚ»»ÐС£
1¡¢½«Õû¸öhtmlÈ«²¿Êä³öexecl
´Ë·¨½«htmlÖÐËùÓеÄÄÚ ......

ASPÓëActiveX¿Ø¼þ½»»¥ÊµÕ½(Ò»)

ASPÓëActiveX¿Ø¼þ½»»¥ÊµÕ½(Ò»)  
   
  ¹Ø¼ü×Ö:ASP,ActiveX¿Ø¼þ,Êý×ÖÇ©Ãû,°²È«    
   
  ActiveX¿Ø¼þÔËÐÐÔÚ¿Í»§¶Ë¡£ÎÒÃÇ¿ÉÒÔ»ñµÃ¿Í»§¶ËµÄһЩÐÅÏ¢£¬ÈçIC¿¨µÄÐÅÏ¢,¿Í»§¶ËµÄÑéÖ¤µÈµÈ¡£µ«ÊÇActiveX¿Ø¼þÒ²ÓÐÐí¶àȱµã£º¿Í»§¶ËµÄ²¿ÊðºÜÀ§ÄÑ£¬Èç¿Í»§¶Ë²»ÄÜÕýÈ·ÏÂÔØ£¬ÏÂÔØÁË ......

ASPÀàµÄ¶¨Òå

ASPÀà
£½£½£½£½£½£½£½£½£½
ʹÓÃVBSµÄASPÒ²Äܶ¨ÒåÀàµÄ£¡±¾ÎĽ«½éÉܶ¨Ò塢ʹÓÃÀàµÄ»ù±¾·½·¨¡£
ÔÚASP£¨ÌØÖ¸Ê¹ÓÃVBSµÄASP£¬ÏÂͬ£©ÀʹÓÃClassÓï¾äÀ´ÉùÃ÷Ò»¸öÀà¡£Óï·¨ÈçÏ£º
Class ˈ̞
End Class
ÀàµÄ¶¨Òå¡¢±äÁ¿¡¢ÊôÐԺͷ½·¨µÈ¶¼°üº¬ÔÚClass...End Class¿éÖС£
ÏÂÃæ¾Í¿ÉÒÔ¶¨ÒåÀàµÄÊôÐԺͷ½·¨ÁË¡£Õýʽ½²ÊôÐÔ¡¢·½·¨µ ......

aspµ¼³öexcelÒ»

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%response.ContentType   ="application/vnd.ms-excel"  
%>  
<%
Set xlApplication = Server.CreateObject("Excel.Application") 'µ÷ÓÃexcel¶ÔÏó
xlApplication.Visible = False 'ÎÞÐè´ò¿ªexcel
xlApplication.SheetsInN ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ