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

¥Îexcel¤Wºô¬d­µ¼Ð ¤S±¾¤F

¥Îexcel¤Wºô¬d­µ¼Ð ¤S±¾¤F

¯u®`YAHOO!©_¼¯¦r¨å¤S§ïª©¤F
­µ¼Ð¤S§ä¤£¨ì¤F
¥u¯à¬Ý¨ì¸ÑÄÀ
·s¼Wªº§Y®Éµo­µ¦n¹³¯»¤£¿ù
    1. Sub searchIT(Rng As Range)
   2.     Dim XH As Object
   3.     Dim shpRm As Shape
   4.     '²M°£¤w¦³ªº¸ÑÄÀ¤Î­µ¼Ð
   5.     With Rng.EntireRow
   6.         .Resize(1, .Columns.Count - 1).Offset(0, 1).Clear
   7.     End With
   8.     '¶}±Òºô­¶
   9.     Set XH = CreateObject("Microsoft.XMLHTTP")
  10.     With XH
  11.         .Open "get", "http://tw.dictionary.yahoo.com/dictionary?p=" & Rng.Text, False
  12.         .send
  13.         On Error Resume Next
  14.         'ºK¨ú²Ä¤@²Õ¤¤¤å½Ķ
  15.         Rng.Offset(0, 2) = Split(Split(.responseText, "class=""description""><p>1.")(1), "<")(0)
  16.         'ºK¨úKK­µ¼Ð
  17.         Rng.Offset(0, 1) = Left(VBA.Split(.responseText, "KK</span>  ")(1), InStr(VBA.Split(.responseText, "KK</span>  ")(1), "]"))
  18.         
  19.     End With
  20.     Rng.Select
  21. End Sub
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

¦^´_ 1# ¦Û§Ú·Pı¨}¦n
17. Rng.Offset(0, 1) = Left(VBA.Split(.responseText, "KK</span>  ")(1), InStr(VBA.Split(.responseText, "KK</span>  ")(1), "]"))
§R°£ªÅ®æ­×§ï¦p¤U:
Rng.Offset(0, 1) = Left(VBA.Split(.responseText, "KK</span>")(1), InStr(VBA.Split(.responseText, "KK</span>")(1), "]"))

TOP

'ºK¨úKK­µ¼Ð
           Rng.Offset(0, 1) = Split(Split(.responseText, "KK</span> ")(1), "<span> DJ")(0)

TOP

¦^´_ 3# oobird
½Ð°Ýª©¤j
§Ú¥Î¤F¬ÛÃö»yªk.responseText
¥i¬O¹q¸£¥X²{¤£¥¿½Tªº¤Þ¥Î

¥i§_À°§Ú¬Ý¬Ý°ÝÃD,ÁÂÁÂ!
´ú¸Õ.rar (4.8 KB)

TOP

  1. Sub URLString()
  2. Dim x As String
  3.     Set xPost = CreateObject("Microsoft.XMLHTTP")
  4.     Set Fsys = CreateObject("Scripting.FileSystemObject")
  5. With xPost
  6.     .Open "GET", "http://mops.twse.com.tw/mops/web/ajax_t108sb27?step=1&firstin=ture&off=1&TYPEK=sii&co_id_1=&co_id_2=&year=101&month=&b_date=&e_date=&type=1&rulesubmit2=%20%E6%90%9C%E5%B0%8B%20", 0   '­nÂ^¨ú­ì©l½Xªººô§}
  7.     .send
  8.     Do While xPost.ReadyState <> 4
  9.     Loop

  10.    
  11. 'PS:¦¹³B²Å¦X·j´Mªº¦r¦ê¦³¨â²Õ,»yªk½Ð±Ð..... x = ¶Ç¦^ "t108sb27_" ¶}©l¨ì ".csv" µ²§ôªº¦r¦ê
  12.    
  13.     x = Split(Split(.responseText, "filename' value='")(1), "<table class='noBorder")(0)
  14. End With
  15. End Sub
½Æ»s¥N½X
¦^´_ 4# HSIEN6001

TOP

¦^´_ 5# oobird


    oobird ¤j
¦^¶Ç­È,¦h¤F '> ¤Î±j¨î´«¦æAlt+Enter
¥i§_±Æ°£?!

­è­è¹ï·Ó¤@¤U»yªk
¤´Â¤£¸Ñ .responseText
¦b¤§«e¥¼¦ó·|¥X²{"¤£¥¿½Tªº¤Þ¥Î"
¨âªÌVBA °£¤F¦^°é
¦ü¥G®t²§¤£¤j

§Ú¥~¦æ,½Ð¤j¤j´£¥Ü
ÁÂÁÂ!

TOP

¦^´_ 5# oobird

­è­èµy·L­×§ï¸Õ¤FGBKEE¤jªº»yªk
±Æ°£¤FAlt+Enterªº°ÝÃD

Left(VBA.Split(.responseText, "filename' value='")(1), InStr(VBA.Split(.responseText, "<table class='noBorder")(1), ">"))

ºâ¬O"½M¿ß"~©I§Ë¹ï¤F¶Ü?!
^^

¥t¤@­ÓºÃ°Ý,ÁٽЪ©¤j¶}¥Ü!

TOP

¦^´_ 6# HSIEN6001
.responseText¥²¶·¦bWith xPost.....End With±Ô­z°Ï¬q¤º¤Þ¥Î
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 8# Hsieh


    §ÚVBA¬O¦b£¸ª¾¥b¸ÑªºÀ³¥Î http://tw.knowledge.yahoo.com/question/question?qid=1512022306295
©Ò¥H±`±`·d¤£²M·¡
ÁÂÁª©¤j´£¿ô,·P®¦!

TOP

¦^´_ 2# GBKEE

½Ð°Ý <input type='hidden' name='filename' value='t108sb27_20120712_17145551.csv'>
¨ú¥X³o¬q t108sb27_20120712_17145551.csv
À³¸Ó«ç»ò¤U»yªk¤~¹ï

¥H¤U»yªk,¦³®É·|Err
Left(VBA.Split(.responseText, "filename' value='")(1), InStr(VBA.Split(.responseText, "<table class='noBorder")(1), ">"))
Left(VBA.Split(.responseText, "filename' value='")(1), InStr(VBA.Split(.responseText, "<table class='noBorder")(1), "<"))
¬õ¦â¦rÅé¦ì¸m,®É±`­n§ó¥¿
¬Oªø«×¹Bºâ¿ù»~?!

³o¬q»yªk¤£À´,¥i¥H³Â·Ð«ü¾É¤Îµy¥[»¡©ú?!
Left(VBA.Split(.responseText, "filename' value='")(1), InStr(VBA.Split(.responseText, "<table class='noBorder")(1), ">"))
InStr ¤Î Split ¬d¹L¤FÁÙ¬O¤£À´

~ÁÂÁÂ!!

TOP

        ÀR«ä¦Û¦b : ¦h°µ¦h±o¡C¤Ö°µ¦h¥¢¡C
ªð¦^¦Cªí ¤W¤@¥DÃD