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

[µo°Ý] VBA¦Û°Ê§ì¨úfinance.yahoo

¥»©«³Ì«á¥Ñ f3202 ©ó 2018-6-17 15:43 ½s¿è

¦^´_ 8# iamaraymond


a99¤§«áªÑ¦W¤U¸ü¤£¨ì
ÁÂÁÂ

TOP

¦^´_ 2# f3202


   Very  Nice code!  Thank you very much!

TOP

请±Ð这个«ü标¥i¥H¥Îvba´£¨ú吗¡H

这¨½¯u¬O°ª¤â¤ª¶°¡A¥H«e¤@¨Ç¥H为没ªk¥ÎVBA´£¨úªº资®Æ­ì来¬O¥i¥Hªº¡I¨º¤\请±Ð¤U­±这个ÊI¯¸ªºRSI数Õu¥i¥H¥Îvba¦Û动´£¨ú吗¡H 谢谢¡I

http://www.aastocks.com/tc/stock/detailchart.aspx?symbol=110000#GTop

TOP

¦^´_ 9# f3202

³oÀ³¸Ó¥i¥H¨Ï¥Î±z¦b¥t¥~¤@­Ó©«¤l¦^ªº
http://forum.twbts.com/redirect. ... 3&fromuid=30076
xmlhttp+htmlfile¨Ó§ì¨ì
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 10# iamaraymond

9¼Óªº¹Ï¬O¨º­Óµ{¦¡¤U¸ü¥[ÅܽXªº
ÁÂÁÂ

TOP

¦^´_ 11# f3202

¸Õ¸Õ¬Ý
  1. Sub test()

  2. Dim t: t = Timer

  3. Cells.Clear

  4. Dim myXML As Object
  5. Set myXML = CreateObject("Microsoft.XMLHTTP")

  6. Dim myHTML As Object
  7. Set myHTML = CreateObject("HTMLFile")

  8. With myXML
  9.     .Open "GET", "https://djinfo.cathaysec.com.tw/z/ze/zef/zef.djhtm", False
  10.     .send
  11.    
  12.     myHTML.body.innerHTML = convertraw(.responseBody)
  13.     Set myTrs = myHTML.getElementsByTagName("table")(2).getElementsByTagName("tbody")(0).getElementsByTagName("tr")
  14.     ReDim myArr(1 To myTrs.Length + 1, 1 To 4)
  15.     i = 1
  16.     For Each myTr In myTrs
  17.         Set myTds = myTr.getElementsByTagName("td")
  18.         j = 1
  19.         For Each myTd In myTds
  20.             myArr(i, j) = myTd.innerText
  21.             If myTd.innerText = "" Then
  22.                 myArr(i, j) = Right(Split(Split(Split(myTd.innerHTML, "GenLink2stk(")(1), "')")(0), "'")(1), 4) & Split(Split(Split(myTd.innerHTML, "GenLink2stk(")(1), "')")(0), "'")(3)
  23.             End If
  24.             j = j + 1
  25.         Next
  26.         i = i + 1
  27.     Next
  28.    
  29. End With
  30. Range("A1").Resize(UBound(myArr, 1), 4).Value = myArr
  31. Range("A1").WrapText = False
  32. Set myXML = Nothing
  33. Application.StatusBar = "§ì¨ú§¹²¦¡A¦@ªá¶O" & Format(Timer - t, "0.00¬í")

  34. End Sub
  35. Function convertraw(rawdata)

  36. Dim rawstr
  37. Set rawstr = CreateObject("adodb.stream")
  38. With rawstr
  39. .Type = 1
  40. .Mode = 3
  41. .Open
  42. .Write rawdata
  43. .Position = 0
  44. .Type = 2
  45. 'ÁcÅé³q±`Âনbig5´N¥i¥H¤F¡A²Åé³q±`¬Ogb2312
  46. .Charset = "big5"
  47. convertraw = .ReadText
  48. .Close
  49. End With
  50. Set rawstr = Nothing

  51. End Function
½Æ»s¥N½X
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

¦^´_ 12# iamaraymond

ÁÂÁª©¤j
²Ä¤@­Ó´ú¸Õ¦¨¥\
²Ä¤G­Ó§Ú¬ã¨s¬Ý¬Ý
­Y¦³°ÝÃD¦A½Ð±Ðª©¤j
¨Î¸`´r§Ö

TOP

¦^´_ 13# f3202

OK¡A§A¥i¥H¥ý¬ã¨s¤@¤Uµ{¦¡½X
¬Ý¦p¦ó§ï¦¨§ì²Ä¤G­Óºô§}ªº¸ê®Æ
³o¼Ë¤ñ¸û®e©ö¶i¨B
­Y¦³°ÝÃD³£¥i¥H°Ý³á~
Excel VBAºô­¶¸ê®Æ¦¬¶°±Ð¾Ç:
http://forum.twbts.com/thread-20848-1-1.html

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD