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

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

  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

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

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

TOP

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

TOP

¦^´_ 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

        ÀR«ä¦Û¦b : ¤£©È¨Æ¦h¡A¥u©È¦h¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD