Import data from web with querytables

Can anybody tell me how to insert a web query in an Excel-sheet?

I want to create an Excel document that automatically contains a web query to fill the sheet with data provided by a url.

In Excel I recorded a macro just to see the VB code that it generates:

With ActiveSheet.QueryTables.Add(Connection:="URL;http://www.google.com", _
Destination:=Range("$A$1"))
.Name = "www.google.com"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With

Thanks!


1 Reply

GM Geetha M Syncfusion Team March 3, 2009 11:10 AM UTC

Hi Ferry,

Thank you for your interest in Syncfusion products.

Currently Essential XlsIO does not support inserting a web query.

Please let me know if you have any questions.

Regards,
Geetha


Loader.
Up arrow icon