ªÑ²¼¸ê®Æ¶×¤J¡Aµ{¦¡°õ¦æ¦³°ÝÃD
- ©«¤l
- 8
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 41
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-1-2
- ³Ì«áµn¿ý
- 2016-12-28
|
ªÑ²¼¸ê®Æ¶×¤J¡Aµ{¦¡°õ¦æ¦³°ÝÃD
¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-6-17 05:03 ½s¿è
¼Ò¥éª©¤j½s§ï¤@Óµ{¦¡
¦ý¶×¤J¦³®É·|°±¤î¤¤Â_¡A°±¤îªº¦ì¸m¤£¤@©w
§ÚÃhºÃ¬O°O¾ÐÅ餣¨¬¡A¸Ó¦p¦ó§ï©O¡H- Sub ¾ú¥vªÑ»ù§ó·s()
- Dim xTable As Object, k As Integer, c As Integer, r As Integer, rc As Integer, sn As Integer
- Dim url As String, i As Integer, E As Object
- With Sheets("Àç¹BÁZ®Ä")
- .UsedRange.Clear
- End With
- Sheets("Á`ªí").Select
- rc = Cells(Rows.Count, 1).End(xlUp).Row
- For i = 5 To rc
- sn = Cells(i, 1)
- url = "http://goodinfo.tw/StockInfo/StockBzPerformance.asp?STOCK_ID=" & sn & " &YEAR_PERIOD=10&RPT_CAT=M_YEAR"
- With CreateObject("InternetExplorer.application")
- .Visible = True
- .Navigate url
-
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- Set xTable = .Document.getElementsByTagName("TABLE")(11) '¸ê®Æ¦b³o
- With Sheets("Àç¹BÁZ®Ä")
- k = k + 1
- For r = 0 To xTable.Rows.Length - 1
- For c = 0 To xTable.Rows(r).Cells.Length - 1
- .Cells(k, c + 1) = xTable.Rows(r).Cells(c).innertext
- Next
- k = k + 1
- Next
- End With
- Set xTable = .Document.getElementsByTagName("TABLE")(13) '¸ê®Æ¦b³o
- With Sheets("Àç¹BÁZ®Ä")
- k = k + 1
- For r = 0 To xTable.Rows.Length - 1
- For c = 0 To xTable.Rows(r).Cells.Length - 1
- .Cells(k, c + 1) = xTable.Rows(r).Cells(c).innertext
- Next
- k = k + 1
- Next
- End With
- Set xTable = .Document.getElementsByTagName("TABLE")(19) '¸ê®Æ¦b³o
- With Sheets("Àç¹BÁZ®Ä")
- k = k + 1
- For r = 0 To 3
- For c = 0 To xTable.Rows(r).Cells.Length - 1
- .Cells(k, c + 1) = xTable.Rows(r).Cells(c).innertext
- Next
- k = k + 1
- Next
- End With
- .Quit
- End With
- Next
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 1# caesar0125 - ¡yFor i = 5 To rc¡z ªº rc ¦pªG¶W¹L¤QÓ¥H¤W¡A·|µo¥Í¥H¤U¤§°T®§¡G
- ©Ò¥H«Øij¤£n¤@¦¸µL¤îºÉªº·j´M¡A³Ì¦n¤À¦¸¡B¤À®É¬qªº¨Ó°õ¦æ¡C
- ¡uºô¯¸°»´ú¨ì±zªºÂsÄý¶q²§±`, ¥Ø«e¼È®ÉÃö³¬ªA°È, ½Ðµy«á¦A«·s¬d¸ß¡v
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 1# caesar0125
§Ú±Nµ{¦¡µyµy¾ã²z¤F¤@¤U¡A
¥[±j Focus ¨ì Sheets("Àç¹BÁZ®Ä")¡C- Sub ¾ú¥vªÑ»ù§ó·s()
- Dim xTable As Object, k As Integer, c As Integer, r As Integer, rc As Integer, sn As Integer
- Dim url As String, i As Integer, E As Object
-
- Sheets("Á`ªí").Select
- rc = Cells(Rows.Count, 1).End(xlUp).Row
- k = 0
-
- With Sheets("Àç¹BÁZ®Ä")
- .Select
- .UsedRange.Clear
- End With
-
- ' For i = 5 To rc
- For i = 1 To 5
- sn = Sheets("Á`ªí").Cells(i, 1)
- url = "http://goodinfo.tw/StockInfo/StockBzPerformance.asp?STOCK_ID=" & sn & " &YEAR_PERIOD=10&RPT_CAT=M_YEAR"
- With CreateObject("InternetExplorer.application")
- .Visible = True
- .Navigate url
-
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
-
- Set xTable = .Document.getElementsByTagName("TABLE")(11) ' ¸ê®Æ¦b³o
-
- With Sheets("Àç¹BÁZ®Ä")
- k = k + 1
- For r = 0 To xTable.Rows.Length - 1
- For c = 0 To xTable.Rows(r).Cells.Length - 1
- .Cells(k, c + 1) = xTable.Rows(r).Cells(c).innertext
- Next
- k = k + 1
- Next
- End With
-
- Set xTable = .Document.getElementsByTagName("TABLE")(13) ' ¸ê®Æ¦b³o
- With Sheets("Àç¹BÁZ®Ä")
- k = k + 1
- For r = 0 To xTable.Rows.Length - 1
- For c = 0 To xTable.Rows(r).Cells.Length - 1
- .Cells(k, c + 1) = xTable.Rows(r).Cells(c).innertext
- Next
- k = k + 1
- Next
- End With
-
- Set xTable = .Document.getElementsByTagName("TABLE")(19) ' ¸ê®Æ¦b³o
- With Sheets("Àç¹BÁZ®Ä")
- k = k + 1
- ' For r = 0 To 3
- For r = 0 To xTable.Rows.Length - 1
- For c = 0 To xTable.Rows(r).Cells.Length - 1
- .Cells(k, c + 1) = xTable.Rows(r).Cells(c).innertext
- Next
- k = k + 1
- Next
- End With
-
- .Quit
- End With
- Next
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 1# caesar0125
|
|
|
|
|
|
|
- ©«¤l
- 8
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 41
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-1-2
- ³Ì«áµn¿ý
- 2016-12-28
|
¦^´_ 4# c_c_lai
¼Ó¤W¤j¤j
§ÚªºªÑ²¼²M³æ¦³50Ó¡A¤À§å¸ê®Æ¸Ó¦p¦ó³B
§Úªºµ{¦¡¬O¦]¬°§Úªººô¸ô³t«×°ÝÃD¡H¦³®É®»¨ì²M³æ²Ä3¡B4Ó¡A¦³®É¥i®»¨ì²Ä20´XÓ |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 5# caesar0125
§Ú¥ÎIE8 §ì¨ú¸ê®Æ¤]¦³§xÃø
§ï¥Î CreateObject("msxml2.xmlhttp") + CreateObject("htmlfile")
¸Õ¬Ý¬Ý- Sub goodinfo_¦X¨Ö°]³ø()
- Dim xTable As Object, k As Integer, C As Integer, R As Integer, rc As Integer, sn As Integer
- Dim url As String, i As Integer, E As Variant
- Dim oXmlhttp As Object, oHtmldoc As Object, surl, op
- 'Sheets("Á`ªí").Select
- rc = Sheets("Á`ªí").Cells(Rows.Count, 1).End(xlUp).Row
- Sheets("Àç¹BÁZ®Ä").UsedRange.Clear
- For i = 5 To rc
- sn = Sheets("Á`ªí").Cells(i, 1)
- url = "http://goodinfo.tw/StockInfo/StockBzPerformance.asp?STOCK_ID=" & sn & " &YEAR_PERIOD=10&RPT_CAT=M_YEAR"
- Set oXmlhttp = CreateObject("msxml2.xmlhttp")
- Set oHtmldoc = CreateObject("htmlfile")
- With oXmlhttp
- .Open "Get", url, False
- .Send
- oHtmldoc.write .responseText
- End With
- Set xTable = oHtmldoc.all.tags("TABLE")
- With Sheets("Àç¹BÁZ®Ä")
- ' .Cells.Clear
- For Each E In Array(11, 13, 19) '11,13,19 "TABLE"
- k = k + 1
- For R = 0 To xTable(E).Rows.Length - 1
- For C = 0 To xTable(E).Rows(R).Cells.Length - 1
- .Cells(k, C + 1) = xTable(E).Rows(R).Cells(C).innertext
- Next
- k = k + 1
- Next
- Next
- End With
- Next
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-6-10 07:25 ½s¿è
¦^´_ 5# caesar0125
§A¸Õ¸Õ¼Ó¤W GBKEE ª©¤jªº¼Ò²Õ¡A
¨ä°õ¦æ®Ä²v»P³t«×«D±`ªº¨Î¡C ²¦³º
CreateObject("InternetExplorer.application")
¤§³B¸Ìªº½T¯Ó®É¹L¤[¡C |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 6# GBKEE
½Ð±Ð±z¡A¦³¦n¦h¦^°õ¦æ¨ì- Set xTable = oHtmldoc.all.tags("TABLE")
- With Sheets("Àç¹BÁZ®Ä")
- ' .Cells.Clear
- For Each E In Array(11, 13, 19) '11,13,19 "TABLE"
- k = k + 1
- For R = 0 To xTable(E).Rows.Length - 1
½Æ»s¥N½X ¤¤ªº xTable(E).Rows.Length¡A «K²£¥Í¦p¤U¤§¿ù»~°T®§¡G- °õ¦æ¶¥¬q¿ù»~ '91'
- ¨S¦³³]©wª«¥óÅܼƩΠWith °Ï°ìÅܼÆ
½Æ»s¥N½X ¬d¬Ý oXmlhttp.responseText : "<!DOCTYPE HTML>
<html lang="zh-TW">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="I
¤S¬Ý¤£¥X¦³¥ô¦óª¬ªp¡A ¦³®É xTable.length = 0 ©Î xTable.length = 1 µ¥¡C |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ c_c_lai
¥i¥[¤W¨¾¿ù
GBKEE µoªí©ó 2016-6-10 10:27
¦pªG xTable.Length ¬°¹s¡A
Until xTable.Length >= 19 ·|¦p¦P¦ºJ¦P
¥Ã»·¥X¤£¨Ó¡A©Ò¥H§Ú§ï¦¨
If xTable.Length >= 19 Then
.
.
End If
¤´µM¬O¤@±À- 1 0 1437
- 2 0 1438
- 3 0 1439
- 4 0 1440
- 5 0 1441
½Æ»s¥N½X |
|
|
|
|
|
|