ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[­ì³Ð] VBAºô¸ôª¦ÂÎ(ºô¸ô¸ê®Æ»`¶°)

[­ì³Ð] VBAºô¸ôª¦ÂÎ(ºô¸ô¸ê®Æ»`¶°)

¥»©«³Ì«á¥Ñ iamaraymond ©ó 2018-5-7 07:57 ½s¿è

¤£¦n·N«ä¤£¤Óª¾¹D¡¨¤À¨É¡¨¸ò¡¨­ì³Ð¡¨ªº®t²§¡A­Yµ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¦Û¾Ç¦Ó¨Ó¡A­Y¦³¿ù»~©Î«Ø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·Q­n2330ªºªÑ»ù¸ê®Æ¡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 ]
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

¦^´_ 1# iamaraymond

http://club.excelhome.net/thread-1159783-1-1.html

¦³¿³½ìªº¥i¥H¬Ý³oÃä¡AùØ­±§ó¦h¡A§Ú¦Û¤v¤]±q¤¤¾Ç¨ì¤£¤Ö

TOP

³o¸Ì¦³¤@¨Ç±`¥ÎªºªÑ²¼ºô¯¸½d¨Ò,¥i±¤¨S¦³±Ð¾Ç,¦Ó¥Bµo°Ý¼Ó¥D¤£¤@©w·|¦^µª
https://www.mobile01.com/topicdetail.php?f=511&t=4737630&p=1

TOP

¦^´_ 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
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 3# quickfixer

§Úı±osnare¤jÁÙÆZ¼ö¤ßªº¡A¤×¨ä¬OÂà½Xªºµ{¦¡¯uªº«Ü¦n¥Î¡A ¦]¬°³\¦hºô¯¸ªº¤º®e§ì¤U¨Ó³£¬O¶Ã½X
  1. Function convertraw(rawdata)

  2. Dim rawstr
  3. Set rawstr = CreateObject("adodb.stream")
  4. With rawstr
  5. .Type = 1
  6. .Mode = 3
  7. .Open
  8. .Write rawdata
  9. .Position = 0
  10. .Type = 2
  11. 'ÁcÅé³q±`Âনbig5´N¥i¥H¤F¡A²Åé³q±`¬Ogb2312
  12. .Charset = "big5"
  13. convertraw = .ReadText
  14. .Close
  15. End With
  16. Set rawstr = Nothing

  17. End Function
½Æ»s¥N½X
¤Þ¥Î¦Û:
https://www.mobile01.com/topicdetail.php?f=511&t=4737630&p=1
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 4# iamaraymond


    ¤§«e´N¦³ÂsÄý¹L 2# ±ÀÂ˪ººô§}¡A¬O¦³¥¦ªº¤º²[
ÁÙ¬O½Ð«ùÄò§»§Ó¡A¶}ÅP VBAªº³~®|¤Þ»â¥t¤@¾Ç²ßªº¤è¦V»P¤èªk

TOP

        ÀR«ä¦Û¦b : ¤Ñ¤W³Ì¬ü¬O¬P¬P¡A¤H¥Í³Ì¬ü¬O·Å±¡¡C
ªð¦^¦Cªí ¤W¤@¥DÃD