My code is not yet written, only a part of it.
What I want to do is this :
Go to the RacingPost site and retrieve into an Excel sheet for further parsing some specific data(tables) about each race of the day.
the code is grossly as follows:
For i = 0 To n
PremCell = (i * 8) + 1
CardNb = 463358 + i '
Range("A" & PremCell).Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;
_
, Destination:=Range("A1"))
.Name = "card.sd?r_date=2008-8-18&race_id=46358&card_choice=card_4"
.FieldNames = True
.RowNumbers = True
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "10,12,17"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Next
Practically it will go like this:
I go to the RacingPost site, log in, and look for the first race of the day, which displays sth like this:
I want to retrieve this URL, because it gives me directly the identification of the 1st race, that I will increment (in the CardNb variable)till the last one, which lets me extract the 3 quoted tables for all the races of the day.