標題:
[發問]
ie11+office2010,透過vba下載yahoo 的股價要花上30秒左右
[打印本頁]
作者:
cji3cj6xu6
時間:
2016-12-28 17:01
標題:
ie11+office2010,透過vba下載yahoo 的股價要花上30秒左右
最近換系統,ie11+office2010,透過vba下載yahoo 的股價總是要花上30秒左右,
才有辦法將資料抓下來,先前頂多3~5秒而已(ie9+office2003)。
透過以下的設定,發現是跑到SQL (.Refresh BackgroundQuery:=False),
在抓取資料才停格,請問在不動系統的情況下有辦法減少下載時間嗎?
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & WebAddress, Destination:=Selection) '新增查詢
.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 = X
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
.Name = .ResultRange.Cells(3, 1)
End With
歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)