How to Fetch Web Data into Excel

boilingrony

New Member
Joined
Sep 14, 2011
Messages
16
Hi There

Can Anyone tell me how to Fetch record from Website database into Excel Through Excel macro code.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Welcome to the Forum,

May help if you state which version you are using.

Excel 2007/2010 Start Recording a MACRO then select Data Tab and From web on left then find the website etc and once you get into Excel you have the code.

Excel 2003 Start Recording a MACRO then Data Menu and Webquery the rest is the same.
 
Upvote 0
First of all Thankyou for your Reply:)
I'm Using Excel 2003 & i have developed a Macro code in Excle to fetch the data
Sub Test()
Dim Sh As Worksheet
Dim Rng As Range
Dim ShNew As Worksheet
Dim r As Integer
Dim Cell As Range
Dim URL As String
Set Sh = Worksheets("Sheet1")
With Sh
Set Rng = .Range("A2:A" & .Range("A" & .Rows.Count).End(xlUp).Row)
End With
Set ShNew = Worksheets.Add
r = 1
For Each Cell In Rng
URL = "URL;http://www.firstflight.net/n_contrac_new.asp?tracking1=" & Cell.Value
With ShNew.QueryTables.Add(Connection:=URL, Destination:=ShNew.Cells(r, 1))
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingAll
.WebTables = "21"
.Refresh BackgroundQuery:=False
End With
With ActiveSheet
.QueryTables(1).Delete
.Cells(r, 1).Resize(3).EntireRow.Delete
End With
r = r + 1
Next Cell
End Sub


Now the Problem is that it is not working with

http://59.163.53.210/n_ctrack_dom.asp this link..

Here are the Few Tracing Numbers.CC7957385
CC7957386
CC7957388
CC7957389
CC7957390
CC7957393
CC7957394
CC7957395
CC7957397
CC7957398
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top