download & extract information

  • Thread starter Thread starter Chitra
  • Start date Start date
Excel 2003. Data>Import External Data>New Web Query.

Enter the URL in the Address dialog box then hit Import.

Excel 2007 Data>From the Web


Gord Dibben MS Excel MVP
 
Left out a couple steps that you may not figure out on your own.

After you paste the URL in the address box, hit "Go"

Select the data table by clicking on the yellow arrow.

Then Import.


Gord
 
Copy your url into a1 of the sheet where you want the query. Run this macro.
Then record a refresh for future use.

Sub createquery()
myurl = Range("a1")

Application.CutCopyMode = False
With ActiveSheet.QueryTables.Add(Connection:="URL;" & myurl & ".shtml" _
, Destination:=Range("A3"))

.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = """Table1"",""Table2"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
ActiveSheet.Columns.AutoFit
End Sub
 
Back
Top