- 帖子
- 2
- 主題
- 0
- 精華
- 0
- 積分
- 2
- 點名
- 0
- 作業系統
- win7
- 軟體版本
- pro
- 閱讀權限
- 10
- 註冊時間
- 2014-5-18
- 最後登錄
- 2015-11-27
|
請問各位大大,為什麼我這樣寫沒有辦法抓取 pchome 股票排行
如以下網址: http://pchome.megatime.com.tw/rank/sto0/ock08.html
都會抓到空白,
Sub 抓每月營收(weburl As String)
Sheets("Temp").Activate
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & weburl, Destination:=Range("A1"))
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "7"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub |
|