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

½Ð°Ý¦p¦ó§ì¨újavascriptªº*.csvÀɮסH

¤Ó·PÁ¤F¡I

§Úµo²{¦³¨Çªí®æ¬O¦h©ó¤@µ§¸ê®Æªº¡A©Ò¥H¤@­ÓºÞ¨î½s¸¹ªº¸ê®Æ¦³¥i¯à·|¦³¤@µ§¡B¨âµ§¬Æ¦Ü10µ§¡A¨Ò¦p³o¸Ì¡G

http://prtr.epa.gov.tw/resultEMS.aspx?emsno=E4901607&tab=Panel5

§Úª¦¤F¤@¤U¤å¨Ãgoogle¡A¥»¨Ó·Q¥ÎResultRange.Rows.Count³o­Ó«ü¥O¨Óºâtableªº¦C¼Æ«á¡A¥ý¥HRange().EntireRow.insert´¡¤J©Ò»Ý­nªº¦C¼Æ¡AµM«á¦A¥HResultRange.Rows(i)¥[¤J¼Æ¾Ú¡A¦ý«ç»ò¸Õ³£¬OªÅ¥Õ¡A¤£ª¾¹D¤j¤j¦³¨S¦³¦nªº¿ìªk¡H

ÁÂÁÂ

TOP

¦^´_ 3# torrent



¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Sh As Worksheet, Rng As Range
  4.     Application.ScreenUpdating = False
  5.     Application.DisplayAlerts = False
  6.     Set Rng = Sheets("Sheet1").Range("A2")
  7.     On Error Resume Next
  8.     Set Sh = Sheets.Add
  9.     With Sh.QueryTables.Add("URL;http://prtr.epa.gov.tw/resultEMS.aspx?emsno=" & Rng & "&tab=Panel5", Sh.[A1])
  10.         .WebSelectionType = xlSpecifiedTables
  11.         .WebFormatting = xlWebFormattingNone
  12.         .WebTables = """GridView5"""
  13.         .WebPreFormattedTextToColumns = True
  14.         .WebConsecutiveDelimitersAsOne = True
  15.         .WebSingleBlockTextImport = False
  16.         .WebDisableDateRecognition = False
  17.         .WebDisableRedirections = False
  18.         .Refresh BackgroundQuery:=False
  19.     End With
  20.     Do While Rng <> ""
  21.         With Sh.QueryTables(1)
  22.             Rng.Offset(, 1).Range("A1:I1").Value = IIf(Err.Number = 0, Sh.QueryTables(1).ResultRange.Rows(2).Value, "")
  23.             Err.Clear
  24.             Set Rng = Rng.Offset(1)
  25.             .Connection = "URL;http://prtr.epa.gov.tw/resultEMS.aspx?emsno=" & Rng & "&tab=Panel5"
  26.             .Refresh BackgroundQuery:=False
  27.         End With
  28.     Loop
  29.     Sh.Delete
  30.     Application.DisplayAlerts = True
  31.     Application.ScreenUpdating = True
  32. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦n¹³¬O­C¡A§Ú«e´X¤Ñ¸ÕÁÙ¥¿±`¡C

TOP

¦^´_ 1# torrent
¨t²Î¦£¸L¤¤¡A½Ðµy«á¦A¦¸¬d¸ß¡C

¨t²ÎÃa¤F¶Ü¡A¤â°Ê³£¤£¯à¤U¸ü¡C¡C¡C

TOP

        ÀR«ä¦Û¦b : ¬°¦Û¤v§äÂǤfªº¤H¥Ã»·¤£·|¶i¨B¡C
ªð¦^¦Cªí ¤W¤@¥DÃD