Is there a VB.NET (1.1 or 2.0) equivalent for Excel's
[Data>ImportData >WebQuery]?
Below is a copy of an example of the Excel VBA that I have been using to
pull some data off a webpage. I've got a couple of simple application that
currently live in an Excel workbook as VBA solely for this one function.
I'd like to move this to a VB.NET Windows form application that does not
rely on Excel.
Example of Excel VBA:
Sub GetData()
With ActiveSheet.Que ryTables.Add(Co nnection:="URL; _
http://www.microsoft.c om", Destination:=Ra nge("A1"))
.Name = "www.micros oft"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFo rmulas = False
.PreserveFormat ting = True
.RefreshOnFileO pen = False
.BackgroundQuer y = True
.RefreshStyle = xlInsertDeleteC ells
.SavePassword = False
.SaveData = True
.AdjustColumnWi dth = True
.RefreshPeriod = 0
.WebSelectionTy pe = xlSpecifiedTabl es
.WebFormatting = xlWebFormatting None
.WebTables = """nTable"" "
.WebPreFormatte dTextToColumns = True
.WebConsecutive DelimitersAsOne = True
.WebSingleBlock TextImport = False
.WebDisableDate Recognition = False
.WebDisableRedi rections = False
.Refresh BackgroundQuery :=False
End With
End Sub