¼ÐÃD:
[ì³Ð]
VBAºô¸ôª¦ÂÎ(ºô¸ô¸ê®Æ»`¶°)
[¥´¦L¥»¶]
§@ªÌ:
iamaraymond
®É¶¡:
2018-5-7 07:55
¼ÐÃD:
VBAºô¸ôª¦ÂÎ(ºô¸ô¸ê®Æ»`¶°)
¥»©«³Ì«á¥Ñ iamaraymond ©ó 2018-5-7 07:57 ½s¿è
¤£¦n·N«ä¤£¤Óª¾¹D¡¨¤À¨É¡¨¸ò¡¨ì³Ð¡¨ªº®t²§¡AYµo¿ùª©Áٳ·Ъ©¥D§R¤å
³Ìªñ¦^´_¤F³\¦h©«¤l³£¬OÃö©ó¦p¦ó¥ÎVBA°µºô¸ôª¦ÂΡA§ì¨ú¦pªÑ²¼¸ê®Æµ¥¸ê°T¡A©Ò¥H·Q»¡ª½±µ¼g¦¨¤@½g±Ð¾Ç¤å
Åý¹ï¦¹¦³¿³½ìªºªB¤Í¦³Ó¤JªùªººÞ¹D¡A¥u¬O¦]¬°³o¨Ç³£¬O¦Û¾Ç¦Ó¨Ó¡AY¦³¿ù»~©Î«ØijÁٽЪ©¥D¥H¤Îª©¤Wªº¦U¦ì°ª¤â¤£§[«ü±Ð¡C
¤p§Ì¾Ç²ß¨Ï¥ÎVBA°µºô¸ôª¦ÂΦ³¤@°}¤l¤F¡A§ì¹L¤£¤Ö¸ê®Æ¡A¤]²Ö¿n¤F¤@¨Ç¤ß±o
¤p§Ì¤ñ¸û¼ô±xªºª¦ÂΤ覡¦³¤TºØ:
1.QueryTable(¤]¦³¤HºÙQTªk)
2.¾Þ±±IE
3.XMLHTTP(³oª«¥óªº¥S§ÌÆZ¦hªº¡A¦pMSXML¡BWinHttpµ¥µ¥ªº)
¨ä¤¤1¡B2ªº¤èªk¦b½×¾Â¤¤¤w¸g¨Ï¥Î¹L³\¦h¦¸¡A«Øij¤j®a¦pªG¦³»Ýnªº¸Ü¥i¥H¦Û¦æ·j´M¤@¤U¬ÛÃöªº©«¤l(©Î¬O¤§«á§Ú¦b¼g±Ð¾Ç¤å)
XMLHTTP¦ü¥G¸û¤Ö¤H¹B¥Î¡A¦ý´N³t«×¤W¨Ó»¡¡A¨ä¹ê¬O¤ñQTªk©MIEªk§Ö¤W¦n´X¿
²³æÁ¿¤@¤Uì¦]¡A¤£ª¾¹D¦U¦ì¦³¨S¦³·Q¹L¡A·í§Ú̦bºô¸ô¤W«ö¤U¬YÓ³sµ²®É¡A¨ì©³µo¥Í¤F¬Æ»ò¨Æ©O?
¦bºô¸ô¤W¦³¤ÀClientºÝ¸òServerºÝ
·í«ö¤U³sµ²®É¡AClientºÝ·|µo°e³\¦hRequest¨ìServerºÝ¡AServer±µ¦¬¨ìRequest«á·|¦^¶Ç¬Û¹ïÀ³ªºResponse¦^¨Ó
¥Î¤@Ó²³æªº¨Ò¤l¤ñ³ë¡A´N¹³¬O§A(Client)¤µ¤Ñ±H¤F¤@«Ê«Hµ¹§AªB¤ÍA(Server)¡A»¡§A·Qn2330ªºªÑ»ù¸ê®Æ¡A©ó¬OªB¤ÍA´N§â¸ê®Æ§ä¥X¨Ó±H¦^µ¹§A
©Ò¥H»¡§Ú̬ݨ쪺ºô¯¸´N¬O¡A¥Ñ§Aèèµo¥X¥hªº¤@¤j°ïRequest®³¨ìªºresponse²Õ¦X°_¨Óªº¦¨ªG
´N¹³«÷«÷¹Ï¤@¼Ë¡A¦³request®³¦^¨Ó¡u«÷¹Ïªº®Ø¬[¡v¡A¦³request®³¦^¨Ó¡u¹Ï¤ù¡vªº«÷¹Ï¡A¦³request®³¦^¨Ó¡u¼Æ¾Ú¡vªº«÷¹Ïµ¥µ¥ªº
³Ì«á§â³o¨Ç«÷¹Ï©ñ¦b¸Ó©ñªº¦a¤è¡A´NÅܦ¨¤F§Ú̬ݨ쪺ºô¯¸
¨º¬°¤°»òXMLHTTPªk·|³o»ò§Ö?
¦]¬°XMLHTTP¬O¼ÒÀÀµo°e¤@Ó·|®³¨ì¡u¼Æ¾Úªº«÷¹Ï¡vªºrequest
´«¥y¸Ü»¡¡A¬Û¸û©ó«e±©Ò»¡ªºµo°e¤@¤j°ïrequest¡AXMLHTTP¥uµo°e¤F¤@Órequest¡A¦Ó³oÓrequest¯à®³¨ì¼Æ¾Úªº¸ê®Æ¡A©Ò¥H®É¶¡¤W·íµM®t²§³\¦h
¦ý·íµMIEªk¤]¬O¦³¨äÀuÂI¡A¨Ò¦p¦³¨Çºô¯¸¥i¯ànµn¤J«á¤~·|Åã¥Ü¸ê®Æ
¨º³o®É²z½×¤WXMLHTTPÀ³¸Ó¤]¥i¥H°µ¨ì¡A¦ý¤Q¤À³Â·Ð¡A³o®É§Ú´N·|¿ï¾Ü¥ÎIE¨Ó§ì¸ê®Æ¡C
¥ý¼g¨ì³oÃä§a¡A¤p§Ì³Ìªñ³Q¦UºØdeadlineºR´Ý QAQ
¦ý¦]¬°±q½×¾Â³oÃä¾Ç²ß¨ì³\¦h¡A©Ò¥H·Q¦^õX¤@¤U¡A¼gÂI¦Û¤v«Ü¦³¿³½ìªºªF¦è¡A¤]À°¤j®a´£¤É§ì¸ê®Æªº®Ä²v
§Æ±æ¯à¦h²£¥Í¤@¨Ç¥æ¬y¡AÅýª©¥D̨¯W¸gÀ窺½×¾Â¦h¤@ÂI¤H®ð
[¥»©«¤lµø³QdeadlineºR´Ýªºµ{«×§ó·s:Q :Q ]
§@ªÌ:
joey0415
®É¶¡:
2018-5-7 20:37
¦^´_
1#
iamaraymond
http://club.excelhome.net/thread-1159783-1-1.html
¦³¿³½ìªº¥i¥H¬Ý³oÃä¡Aùر§ó¦h¡A§Ú¦Û¤v¤]±q¤¤¾Ç¨ì¤£¤Ö
§@ªÌ:
quickfixer
®É¶¡:
2018-5-7 21:55
³o¸Ì¦³¤@¨Ç±`¥ÎªºªÑ²¼ºô¯¸½d¨Ò,¥i±¤¨S¦³±Ð¾Ç,¦Ó¥Bµo°Ý¼Ó¥D¤£¤@©w·|¦^µª
https://www.mobile01.com/topicdetail.php?f=511&t=4737630&p=1
§@ªÌ:
iamaraymond
®É¶¡:
2018-5-7 23:46
¦^´_
2#
joey0415
³o©«¤l§Ú¬Ý¹L¡A¸Ì±ªº¤º®eÅý§Ú¾Ç¨ì¤£¤Ö¡A¦ýÃö©ó"¦bVBA¥Îjavascrpt§ì¸ê®Æ"³oÓ·QªkÓ¤H¤£¬O«Ü»{¦P
²¦³º³o¨ä¹ê¬O¥i¥H¥u¥ÎVBA§¹¦¨ªº¨Æ¡A·Pı¤£¤Ó»Ýn¦A¦h¥Î¤@ºØµ{¦¡»y¨¥
ªp¥Bjavascript¤ñVBAÃø¾Çªº¦h¡A¤]¤£®e©ödebug¡A°õ¦æ°_¨Óªº³t«×¦ü¥G¤]¨S¤ñ¸û§Ö(¦L¶H¤¤¡A¦]¬°§Ú¤§«e¯uªº¦³¸Õ¹L)¡A©Ò¥Hı±o¦³ÂI¦h¦¹¤@Á|
¤£ª¾¹Dª©¥D̦³¨S¦³¹Á¸Õ¹L
§@ªÌ:
iamaraymond
®É¶¡:
2018-5-7 23:50
¦^´_
3#
quickfixer
§Úı±osnare¤jÁÙÆZ¼ö¤ßªº¡A¤×¨ä¬OÂà½Xªºµ{¦¡¯uªº«Ü¦n¥Î¡A ¦]¬°³\¦hºô¯¸ªº¤º®e§ì¤U¨Ó³£¬O¶Ã½X
Function convertraw(rawdata)
Dim rawstr
Set rawstr = CreateObject("adodb.stream")
With rawstr
.Type = 1
.Mode = 3
.Open
.Write rawdata
.Position = 0
.Type = 2
'ÁcÅé³q±`Âনbig5´N¥i¥H¤F¡A²Åé³q±`¬Ogb2312
.Charset = "big5"
convertraw = .ReadText
.Close
End With
Set rawstr = Nothing
End Function
½Æ»s¥N½X
¤Þ¥Î¦Û:
https://www.mobile01.com/topicdetail.php?f=511&t=4737630&p=1
§@ªÌ:
Scott090
®É¶¡:
2018-5-8 07:23
¦^´_
4#
iamaraymond
¤§«e´N¦³ÂsÄý¹L 2# ±ÀÂ˪ººô§}¡A¬O¦³¥¦ªº¤º²[
ÁÙ¬O½Ð«ùÄò§»§Ó¡A¶}ÅP VBAªº³~®|¤Þ»â¥t¤@¾Ç²ßªº¤è¦V»P¤èªk
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)