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
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Chitra" wrote in message
...
hi,
i wish to download data from a webite on an excel sheet.
http://content.icicidirect.com/mutua...g4=4&rating5=5
can some1 help me how do i download this table data frm the above site?
Thanks,
chitra