返回列表 上一主題 發帖

[發問] 無法匯入PCHOME 股市資料

請問各位大大,為什麼我這樣寫沒有辦法抓取 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

TOP

Hi GBKEE大大:

你太強了,這可以用
非常謝謝你!!,
不過這是為什麼呢??

thanks

TOP

        靜思自在 : 不要小看自己,因為人有無限的可能。
返回列表 上一主題