ShyamPrabu
New Member
- Joined
- May 7, 2011
- Messages
- 1
Hi ,
I am extracting data from this http://intranet1/asp/fcst/dashboard_2.htm website into excel using macro code(see below), i dont know how to write these codes, i just copy from this forum, i am extracting data from several navigations (ie) after enter into this website, i will go for indexingindex, then i click number near Today, then i will see the agents name, from that i click the numbers and get data.
After extracting the data i want to seperate the data according to the time (ie) PM. can you help on this
Sub GetWebData()
Application.ScreenUpdating = False
ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://intranet1/asp/fcst/DB_WT_KW_Drill.asp?empid=15902614&wtid=15930&resid=15067&startdate=5/6/2011&enddate=5/7/2011", Destination:=Range("A1"))
.Name = "fxhist"
.FieldNames = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.Refresh BackgroundQuery:=False
End With
Range("A1", Cells.Find(What:="History", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Offset(-1)).EntireRow.Delete
Range("A:A").TextToColumns Range("A1"), xlDelimited, Space:=True
Cells.EntireColumn.AutoFit
Application.ScreenUpdating = True
End Sub
I am extracting data from this http://intranet1/asp/fcst/dashboard_2.htm website into excel using macro code(see below), i dont know how to write these codes, i just copy from this forum, i am extracting data from several navigations (ie) after enter into this website, i will go for indexingindex, then i click number near Today, then i will see the agents name, from that i click the numbers and get data.
After extracting the data i want to seperate the data according to the time (ie) PM. can you help on this
Sub GetWebData()
Application.ScreenUpdating = False
ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://intranet1/asp/fcst/DB_WT_KW_Drill.asp?empid=15902614&wtid=15930&resid=15067&startdate=5/6/2011&enddate=5/7/2011", Destination:=Range("A1"))
.Name = "fxhist"
.FieldNames = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.Refresh BackgroundQuery:=False
End With
Range("A1", Cells.Find(What:="History", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Offset(-1)).EntireRow.Delete
Range("A:A").TextToColumns Range("A1"), xlDelimited, Space:=True
Cells.EntireColumn.AutoFit
Application.ScreenUpdating = True
End Sub
Last edited: