VBA ¤U¸ü¥æ©ö©Ò¸ê®ÆETF«e±ªº00·|¦Û°Ê¤£¨£¡An¦p¦ó×¥¿
- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2020-4-24 19:40 ½s¿è
¦^´_ 1# frogfrer
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim Ar, R As Double, C As Integer, Ttitle As String, S As String
- With New InternetExplorer '¤Þ¥Î¶µ¥Ø¥[¤J Microsoft Internet Controls
- .Navigate "https://www.twse.com.tw/exchangeReport/TWTB4U?response=html&date=20200424&selectType=All"
- .Visible = True
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
- With .Document.all.TAGS("TABLE")(0)
- Ttitle = .Rows(0).innerText
- ReDim Ar(1 To .Rows.Length - 1, .Rows(1).Cells.Length - 1)
- For R = 1 To .Rows.Length - 1
- For C = 0 To .Rows(R).Cells.Length - 1
-
- Ar(R, C) = IIf(C = 0 And Mid(.Rows(R).Cells(C).innerText, 1, 1) = 0, "'", "") & .Rows(R).Cells(C).innerText
- 'IIf(C = 0 And Mid(.Rows(R).Cells(C).innerText, 1, 1) = 0, "'", "") '**ÃÒ¨é¥N¸¹0¶}ÀY¥[¤W'Âର¤å¦r
- Next
- Next
- End With
- .Quit
- End With
- With ActiveSheet '¥i§ó§ï¤u§@ªí
- .UsedRange.Clear
- .[a1] = Ttitle
- .[a2].Resize(UBound(Ar), 3) = Ar
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|