返回列表 上一主題 發帖

如何將證交所基本市況報導網站的大盤資料貼入excel

如何將證交所基本市況報導網站的大盤資料貼入excel

請教高手們:
小弟想將證交所基本市況報導網站的大盤資料貼入excel做開收盤資料查詢,結果外巨集做了一個程式,發現它並無法貼在excel 上,不知有何方法能解開此問題?
程式如下:
                  Sub Macro2()
'
' Macro2 Macro
' drew 在 2011/2/17 錄製的巨集
'

'
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://mis.tse.com.tw/market_index.html?market=1", Destination:=Range( _
        "A1"))
        .Name = "market_index.html?market=1"
        .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 = """tblStatistics"""
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
End Sub
望能提供如何改善方向 謝謝在先
^^
DREWCHEN1

回復 1# drewchen1


建議您可以參考以下資料
http://blog.xuite.net/crdotlin/excel/18068595

TOP

謝謝JACK,不過那檔案ID欄位是怎來的,沒辦法查詢,我要的是裏面局部內容,請看相片[attach]4763[/attach][attach]4763[/attach][attachimg]4763
DREWCHEN1

TOP

那檔案ID欄位是怎來的,沒辦法查詢,我要的是裏面局部內容
drewchen1 發表於 2011-2-17 22:00


這個要請教該站長了,個人沒研究過那檔案.

TOP

看來這問題挺難的~~~
DREWCHEN1

TOP

        靜思自在 : 稻穗結得越飽滿,越會往下垂,一個人越有成就,就要越有謙沖的胸襟。
返回列表 上一主題