- ©«¤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
        
|
¦^´_ 1# torrent - Option Explicit
- Sub Ex()
- Dim I As Integer, Rng As Range
- With ActiveSheet '¤u§@ªí¤¤ [AÄæ] ¦³¨Æ·~½s¸¹
- Set Rng = .[A2] '±qA2¶}©lŪ¨ú
- Application.DisplayAlerts = False 'Ãö³¬À³¥Îµ{¦¡ªº¸ß°Ý
- Do While Rng <> "" 'ª½¨ìAÄæ¨S¸ê®Æ
- With Workbooks.Add(1) '·s¼W¬¡¶Ã¯
- With .Sheets(1).QueryTables.Add(Connection:="URL;http://prtr.epa.gov.tw/resultEMS.aspx?emsno=" & Rng & "&tab=Panel1", _
- Destination:=[A1]) '¤u§@ªí·s¼W,¶×¤J¥~³¡¬d¸ß.
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- .WebTables = "6,""GridView3"""
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = True
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = False
- .WebDisableRedirections = False
- .Refresh BackgroundQuery:=False
- .Parent.Names(.Name).Delete
- .Delete
- End With
- .SaveAs ThisWorkbook.Path & "\" & Rng '¦sÀɸê®Æ§¨¦WºÙ
- ' .Close 'Ãö³¬ÀÉ®×
- End With
- Set Rng = Rng.Offset(1) '¤U²¾¤@¦C
- Loop
- Application.DisplayAlerts = True '«ì´_À³¥Îµ{¦¡ªº¸ß°Ý
- End With
- End Sub
½Æ»s¥N½X |
|