ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel to pull data from web (https://www.excelbanter.com/excel-worksheet-functions/175160-excel-pull-data-web.html)

Bigpiggy

Excel to pull data from web
 
I am trying to get excel to pull up data from the web off a specific set of
pages.
http://www.cdw.ca/shop/search/results.aspx?key=
http://insight.ca/apps/nbs/index.php?K=
http://www.ncix.com/search/?q=
http://www.tigerdirect.ca/applicatio....asp?keywords=

I tried using a web query but it was really sloppy.
I want to have 1 search value in a cell (B3 for example) and it looks up the
part on each site.
It then posts the first result part description and price in a table on the
main page.

Any Ideas?

ryguy7272

Excel to pull data from web
 
This recorded macro will do what you want for the first link:

Sub Macro1()

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.cdw.ca/shop/products/default.aspx?EDC=1351281",
Destination:= _
Range("B5"))
.Name = "default.aspx?EDC=" & Range("B3")
.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 = "2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With

End Sub


Follow the logic and modify as appropriate for the other links.

Regards,
Ryan---

--
RyGuy


"Bigpiggy" wrote:

I am trying to get excel to pull up data from the web off a specific set of
pages.
http://www.cdw.ca/shop/search/results.aspx?key=
http://insight.ca/apps/nbs/index.php?K=
http://www.ncix.com/search/?q=
http://www.tigerdirect.ca/applicatio....asp?keywords=

I tried using a web query but it was really sloppy.
I want to have 1 search value in a cell (B3 for example) and it looks up the
part on each site.
It then posts the first result part description and price in a table on the
main page.

Any Ideas?



All times are GMT +1. The time now is 08:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com