½Ð°Ý³oÓºô¶¦p¦ó¥ÎWEB¬d¸ß¿é¤Jexcel
- ©«¤l
- 361
- ¥DÃD
- 57
- ºëµØ
- 0
- ¿n¤À
- 426
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003,2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-13
- ³Ì«áµn¿ý
- 2022-12-8
|
¥»©«³Ì«á¥Ñ joey0415 ©ó 2013-11-18 22:04 ½s¿è
¦^´_ 26# GBKEE
½Ð°Ý¶W¯Åª©¥D
¥H³o¤è¦¡¨Ó§ì¹d¨Éºô¨Ó½m²ß®É¡Aµ{¦¡½X¦p¤U- Sub TEST11()
- Dim x
- With CreateObject("InternetExplorer.Application")
- .Visible = True '¬O§_Åã¥ÜIE
- .Navigate "http://www.cnyes.com/twstock/Institutional/1101.htm"
- Do While .readyState <> 4: DoEvents: Loop
- Set x = .document.getElementById("a_itrust")
- x.Click
- Do While .readyState <> 4: DoEvents: Loop
- .document.body.innerHTML = .document.getElementById("tabvl").outerHTML
- .execwb 17, 2 'Select All
- .execwb 12, 2 'Copy selection
- ActiveSheet.[A1].Select
- ActiveSheet.PasteSpecial Format:="HTML" ', NoHTMLFormatting:=True
- .Quit
- End With
- End Sub
½Æ»s¥N½X ¨ì³o¤@¦æ·|¥X¿ù¡A¦p¹Ï
.document.body.innerHTML = .document.getElementById("tabvl").outerHTML
§Ú¥H¹d¦ëºô¤¤ªº§ë«H¶i¥X¬°¨Ò¤l½m²ß
¦A°Ý¤@Ó§xÂZ«Ü¤[ªº°ÝÃD
.getElementById»P.getElementsByTagName
¦³¨Ç¦³id»Ptagname ¦³¨Ç¥u¦³id ¡A¦³¨Ç¥u¦³tagname
½Ð°Ý¦³¥ý«á±qÄݪºÃö«Y¶Ü¡H
Y¦³¤÷¤lÃö«Y§â¤l³]¬°xªº¸Ü¡A¨º¤÷¼h´N¤£¯àªí¥Ü¶Ü¡HÁÙ¬O¥ý¤÷¼h¦A¥[¤@Ó ¡uÂI¡v
Y³o¼Ë³]x=.document.getElementById("tabvl") ¥X¿ù
½Ðª©¥D«üÂI¤@¤U
|
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 26# GBKEE
·J¾ãªºÆZ¶K¤ßªº¡A¦b§ÀºÝ§Ú¶¶«K¥[¤W¤F¦Û°Ê½Õ¾ãÄõ¼eªº³B¸Ì¡C- With ActiveSheet
- .Cells.Clear
- .[A1].Select
- .PasteSpecial Format:="HTML"
- .Cells.EntireColumn.AutoFit ' ¦Û°Ê½Õ¾ãÄæ¼e
- End With
½Æ»s¥N½X ÁÂÁÂÅo¡I |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 25# stillfish00
·PÁ¸ɨ¬»¡©ú
¦^´_ 24# c_c_lai
¦pªG³o¨Ç ¥X¤f³ø³æ©ñ¦æ³æ¬d¸ßªººô¶¬ÛÃþ¦üªº¥i¦p¦¹ (§ï¤@¤Ustillfish00ªºµ{¦¡½X)- Option Explicit
- Sub ¥X¤f¬d¸ß()
- Dim sID As String, sStatus As String, URL As String
- Dim x
- URL = InputBox("1:¥X¤f³ø³æ©ñ¦æ¸ê®Æ¬d¸ß(²£ÃÒ±M¥Î)(GB315)" & vbLf & "2:¥X¤f³ø³æ³qÃö¬yµ{¬d¸ß(GB309)", "¥X¤f¸ê®Æ¬d¸ß", 1)
- If URL = "" Or (URL <> "1" And URL <> "2") Then Exit Sub
- URL = IIf(URL = "1", "GB315", "GB309")
- sID = InputBox("¥X¤f³ø³æ¸¹½X", "¥X¤f³ø³æ©ñ¦æ¸ê®Æ" & URL & "¬d¸ß", "BE 02XE580024")
- If sID = "" Then Exit Sub
- URL = "http://portal.sw.nat.gov.tw/APGQ/" & URL & "?&declNo=" & sID
- With CreateObject("InternetExplorer.Application")
- .Visible = True ' ¬O§_Åã¥Ü IE
- .Navigate URL
- Do While .readyState <> 4
- DoEvents
- Loop
- For Each x In .document.getElementsByTagName("input")
- If x.Value = "¬d¸ß" Then x.Click: Exit For
- Next
- Do While .document.getElementById("statusMsg").Value = ""
- DoEvents
- Loop
- sStatus = .document.getElementById("statusMsg").Value
- If InStr(sStatus, "[°õ¦æ¦¨¥\]") <= 0 Then .Quit: MsgBox sStatus: Exit Sub
-
- .document.body.innerHTML = .document.getElementById("queryResult").outerHTML
- .execwb 17, 2 ' Select All
- .execwb 12, 2 ' Copy selection
- With ActiveSheet
- .Cells.Clear
- .[A1].Select
- .PasteSpecial Format:="HTML"
- End With
- .Quit
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ joey0415
.document(¤å¥ó).body(¥»Åé).innerHTML(¥N½X,¤å¦r) = .document.getElementById("queryRe ...
GBKEE µoªí©ó 2013-11-18 14:13
¸É¥R¤@¤U innerHTML ©M outerHTML ¤£¦P:
.getElementById("queryResult").outerHTML ¬O«ü¥]§t¦Û¨¼ÐÅÒªºhtml¥N½X¡A¦p <table id="queryResult"><tr>blahblah..</tr></table>
.getElementById("queryResult").innerHTML ¬O¤£¥]§t¦Û¨¼ÐÅÒ¡A¥u¦³¤º³¡ªºhtml¥N½X¡A§Y<tr>blahblah..</tr> |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 23# GBKEE
¦hÁ¤F¡I
¥¿·í§Ú´ú¸Õ§¹¦¨®É¡A¥¿¦n¥ç¬Ý¨ì±z°e¨Óªº°T®§¡A
¹ï§ÚÀ°§U¬Æ¤j¡A¥ç±N±zªºµùÄÀ¥[¤J¨ÃÀ³¥Î¡A
¦A¦¸¨¥Á¡I- Sub ¥X¤f³ø³æ©ñ¦æ³æ¬d¸ßµ²ªG()
- Dim sID As String, sStatus As String
- Dim x
-
- sID = InputBox("¥X¤f³ø³æ¸¹½X", "¥X¤f³ø³æ©ñ¦æ¸ê®Æ¬d¸ß", "BE 02XE580024")
- If sID = "" Then Exit Sub
-
- With CreateObject("InternetExplorer.Application")
- .Visible = True ' ¬O§_Åã¥Ü IE
- .Navigate "http://portal.sw.nat.gov.tw/APGQ/GB309"
-
- Do While .readyState <> 4
- DoEvents
- Loop
-
- ' Set x = .document.getElementById("myform").getElementsByTagName("input")
- ' x(1).Value = sID ' ¶ñ¤J¸¹½X ("declNo")
- ' x(10).Click ' ¬d¸ß ("¬d¸ß")
- ' ¹ï©ó x ªº¹B¥Î¡A¦¹¤W¤U¨âºØªí¹F¤è¦¡¨MªG¤@P¡FµM¤U¦C¤è¦¡¥iÁקK§PÂ_¤W¤§»~§P±¡¨Æ¡C
- For Each x In .document.getElementsByTagName("input")
- If x.Name = "declNo" Then x.Value = sID
- If x.Value = "¬d¸ß" Then x.Click
- Next
-
- Do While .document.getElementById("statusMsg").Value = ""
- DoEvents
- Loop
-
- sStatus = .document.getElementById("statusMsg").Value
- If InStr(sStatus, "[°õ¦æ¦¨¥\]") <= 0 Then .Quit: MsgBox sStatus: Exit Sub
-
- .document.body.innerHTML = .document.getElementById("queryResult").outerHTML
- .execwb 17, 2 ' Select All
- .execwb 12, 2 ' Copy selection
-
- ActiveSheet.[A1].Select
- ActiveSheet.PasteSpecial Format:="HTML" ', NoHTMLFormatting:=True
- .Quit
- End With
- 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 ©ó 2013-11-18 15:27 ½s¿è
¦^´_ 18# stillfish00
½Ð±Ð¤@¤U¡A§Ú§â .Navigate "http://portal.sw.nat.gov.tw/APGQ/GB315" ´«¦¨
.Navigate "http://portal.sw.nat.gov.tw/APGQ/GB309" ¥X¤f³ø³æ³qÃö¬yµ{¬d¸ß-
- Set x = .document.getElementById("myform").getElementsByTagName("input")
- x(2).Value = sID ' ¶ñ¤J¸¹½X (쥻¬° x(0).Value = sID )
- x(11).Click ' ¬d¸ß (쥻¬° x(1).Click )
½Æ»s¥N½X °õ¦æ¨ì ActiveSheet.PasteSpecial Format:="HTML" «oµo¥Í¤F¿ù»~°T®§¡A
½Ð°ÝÀ³¦p¦ó×¥¿¤èÄÝ¥¿½T¡H ÁÂÁ§A¡I |
|
|
|
|
|
|
- ©«¤l
- 361
- ¥DÃD
- 57
- ºëµØ
- 0
- ¿n¤À
- 426
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003,2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-13
- ³Ì«áµn¿ý
- 2022-12-8
|
¥»©«³Ì«á¥Ñ joey0415 ©ó 2013-11-18 12:00 ½s¿è
¦^´_ 19# GBKEE - .document.body.innerHTML = .document.getElementById("queryResult").outerHTML
½Æ»s¥N½X §â.outerHTMLªº¶Çµ¹.body.innerHTML ?
½Ð°Ý¶Wª©¡A³o¥y¸Ü«ç¸Ñ©O¡H
ÁÂÁÂ |
|
|
|
|
|
|