0
我是編程新手,我試圖通過我的網頁查詢工作。excel vba - 在網絡查詢中創建參數和循環
代碼中,我迄今是這樣的......
Sub webquery1()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://dealoz.com/prod.pl?cat_id=&op=buy&op2=&lang=en-us&search_country=us&shipto=us&cur=usd&zip=&nw=y&class=&pqcs=&pkcs=&quantity=&shipping_type=&sort=&catby=&query=[""089203579X""]&ean=[""9780892035793""]&mpn=&asin=&rcount=2" _
, Destination:=Range("A1"))
.Name = _
"prod.pl?cat_id=&op=buy&op2=&lang=en-us&search_country=us&shipto=us&cur=usd&zip=&nw=y&class=&pqcs=&pkcs=&quantity=&shipping_type=&sort=&catby=&query=[""089203579X""]&ean=[""9780892035793""]&mpn=&asin=&rcount=2"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "10"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
我想參數添加到該網站查詢,例如,該網站將採取ISBN編號從我對另一個Excel列表片。 每個isbn號碼將進入網絡查詢並將信息輸入到單元格中。然後代碼將重複,直到它通過我列表中的所有isbn數字。 感謝您的任何幫助!