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

[µo°Ý] ¤W¥«­ÓªÑ¤é¦¨¥æ¸ê°T¤U¸ü§ïª©«Øij

¦^´_ 19# jsleee

§Ú§ä¨ìªº¤èªk¬Oºô­¶¤W¦³download htmlºô­¶ªº«ö¶s¡A
«ö¤U¥h·s¶}ªººô­¶ºô§}´N¬O¤F¡A
µw¬O¬Ý¤F¥b¤Ñºô­¶µ{¦¡½X¡A¤~µo²{­ì¨Ó«ö¤@¤U´N¦³µ²ªG¤F

TOP

ºô§}¦³¤F

¦Û¤v½m²ß¬Ý¬Ý
joey0415 µoªí©ó 2017-5-24 21:35

½Ð±Ð¤@¤U¡A¦r«¬¸ò¤j¤p¦p¦ó±±¨î??

TOP

¦^´_ 21# prin.huang


    ¤F¸Ñ
    ·PÁ§A

JS

TOP

¦^´_  prin.huang

ºô§}¦³¤F

¦Û¤v½m²ß
joey0415 µoªí©ó 2017-5-24 21:38


½Ð±Ð¤U­±³o­Óºô§}³o»ò§ì?
http://www.tse.com.tw/zh/page/trading/fund/BFI82U.html

TOP

TOP

¦^´_  t8899


¦Û¤v½m²ß¬Ý¬Ý
joey0415 µoªí©ó 2017-6-3 20:50

·PÁ«ü¾É

TOP

±z¦n
½Ð°Ý¥H¤U³o­Ó´Á³f¥æ©ö¸ê°Tªººô­¶¡A­Y­n³z¹Lµ{¦¡½X¨Ó§ì¨ú¤£¦P¤é´Áªº¸ê®Æ¡A¸Ó¦p¦ó³B²z¡H
¦A³Â·Ð¥ý¶i­Ì«üÂI¡AÁÂÁÂ
http://www.taifex.com.tw/chinese/3/7_12_1.asp

TOP

¦^´_ 27# jsleee
¦Û¤v¼gªºfunctionµ¹§A°Ñ¦Ò¡A·|¦^¶Ç¤@­Óstring°}¦C
  1. Private Function GetWebTb1(sURL00$, nTT00%, nRR00%, nCC00%, bRd00 As Boolean)
  2. '===sURL00      ¬°Â^¨úºô§}
  3. '===nTT00       ¬°Åª¨ú²Ä´X­ÓTable(±q1¶}©l)
  4. '===nRR00       ¸ÓTable¥Ñ²Ä´X¦C¶}©lŪ¨ú(±q1¶}©l)
  5. '===nCC00       ¸ÓTable¥Ñ²Ä´XÄæ¶}©lŪ¨ú(±q1¶}©l)
  6. '===bRd00       ¸Ó¸ê®Æ¬O§_¿é¥X
  7. Dim nR00%, nC00%, sTemp() As String, oXml As Object, oDoc As Object, oE As Object, tt As Date
  8.     Set oXml = CreateObject("MSXML2.XMLHTTP.6.0")
  9.     Set oDoc = CreateObject("HTMLFile")
  10.     bRd00 = True
  11. rSend:
  12.     tt = Now() + TimeValue("0:00:20")
  13.     With oXml
  14.         .Open "Get", sURL00, True
  15.         .setRequestHeader "Content-type", "application/x-www-form-urlencoded"
  16.         .send
  17.         On Error Resume Next
  18.         Do While .ReadyState <> 4 Or .Status <> 200
  19.             DoEvents
  20.             If Now > tt Then GoTo rSend
  21.         Loop
  22.         On Error GoTo 0
  23.         oDoc.write .responseText
  24.     End With
  25.     If oDoc.all.tags("Table")(nTT00 - 1) Is Nothing Then bRd00 = False: GoTo Err1
  26.     Set oE = oDoc.all.tags("Table")(nTT00 - 1)
  27.     With oE
  28.         ReDim sTemp(.Rows.Length - nRR00, .Rows(nRR00 - 1).Cells.Length - nCC00)
  29.         For nR00 = 0 To .Rows.Length - nRR00
  30.             For nC00 = 0 To .Rows(nR00 + nRR00 - 1).Cells.Length - nCC00
  31.                 sTemp(nR00, nC00) = .Rows(nR00 + nRR00 - 1).Cells(nC00 + nCC00 - 1).innerText
  32.             Next nC00
  33.         Next nR00
  34.     End With
  35. Err1:
  36.     GetWebTb1 = sTemp
  37.     oXml.abort
  38.     oDoc.Close
  39.     Set oXml = Nothing
  40.     Set oDoc = Nothing
  41.     Set oE = Nothing
  42. End Function
½Æ»s¥N½X

TOP

¦^´_ 28# prin.huang


    ¤£¦n·N«ä
    ½Ð°Ý prin.huang ¥ý¶i
    ³o­ÓFunction ­n¦p¦ó¹B¥Î¡H

TOP

¦^´_ 29# jsleee
°²³]­n§ìhttp://www.twse.com.tw/exchangeReport/MI_INDEX?response=html&date=20170609&type=MS
³oºô­¶ªº²Ä¤@­Óªí¡A±q²Ä¤G¦C¶}©l§ì
(¦]µ{¦¡§PÂ_Äæ¦ì¯x°}«Å§i¾a­n§ì¨úªº²Ä¤@¦C¦³´X­ÓÄæ¦ì, ­Y­n±q²Ä¤@¦C¶}©l§ì, §A¦Û¤v­n¦A§ï¤@¤U)
¼g¤@¬qµ{¦¡µ¹function»Ý­nªº¸ê°T¡A¦A§âfunction¶Ç¦^ªº¸ê®Æ¡A¿é¥X¨ìexcel¬¡­¶ªí¡A°Ñ¦Ò¦p¤U
  1. Sub main()
  2. Dim URL$, VV As Boolean, AB() As String

  3. URL = "http://www.twse.com.tw/exchangeReport/MI_INDEX?response=html&date=20170609&type=MS"
  4. AB = GetWebTb1(URL, 1, 2, 1, VV)
  5. If VV = True Then ActiveSheet.Range("A1:E63") = AB

  6. End Sub

  7. Private Function GetWebTb1(sURL00$, nTT00%, nRR00%, nCC00%, bRd00 As Boolean)
  8. '===sURL00      ¬°Â^¨úºô§}
  9. '===nTT00       ¬°Åª¨ú²Ä´X­ÓTable(±q1¶}©l)
  10. '===nRR00       ¸ÓTable¥Ñ²Ä´X¦C¶}©lŪ¨ú(±q1¶}©l)
  11. '===nCC00       ¸ÓTable¥Ñ²Ä´XÄæ¶}©lŪ¨ú(±q1¶}©l)
  12. '===bRd00       ¸Ó¸ê®Æ¬O§_¿é¥X
  13. Dim nR00%, nC00%, sTemp() As String, oXml As Object, oDoc As Object, oE As Object, tt As Date
  14.     Set oXml = CreateObject("MSXML2.XMLHTTP.6.0")
  15.     Set oDoc = CreateObject("HTMLFile")
  16.     bRd00 = True
  17. rSend:
  18.     tt = Now() + TimeValue("0:00:20")
  19.     With oXml
  20.         .Open "Get", sURL00, True
  21.         .setRequestHeader "Content-type", "application/x-www-form-urlencoded"
  22.         .send
  23.         On Error Resume Next
  24.         Do While .ReadyState <> 4 Or .Status <> 200
  25.             DoEvents
  26.             If Now > tt Then GoTo rSend
  27.         Loop
  28.         On Error GoTo 0
  29.         oDoc.write .responseText
  30.     End With
  31.     If oDoc.all.tags("Table")(nTT00 - 1) Is Nothing Then bRd00 = False: GoTo Err1
  32.     Set oE = oDoc.all.tags("Table")(nTT00 - 1)
  33.     With oE
  34.         ReDim sTemp(.Rows.Length - nRR00, .Rows(nRR00 - 1).Cells.Length - nCC00)
  35.         For nR00 = 0 To .Rows.Length - nRR00
  36.             For nC00 = 0 To .Rows(nR00 + nRR00 - 1).Cells.Length - nCC00
  37.                 sTemp(nR00, nC00) = .Rows(nR00 + nRR00 - 1).Cells(nC00 + nCC00 - 1).innerText
  38.             Next nC00
  39.         Next nR00
  40.     End With
  41. Err1:
  42.     GetWebTb1 = sTemp
  43.     oXml.abort
  44.     oDoc.Close
  45.     Set oXml = Nothing
  46.     Set oDoc = Nothing
  47.     Set oE = Nothing
  48. End Function
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤£­n¤p¬Ý¦Û¤v¡A¦]¬°¤H¦³µL­­ªº¥i¯à¡C
ªð¦^¦Cªí ¤W¤@¥DÃD