hello guys, i have writen a vba code tha imports data from a web page asking the date and gives the relevant table, my problem is that i don't know how to keep only the columns with hours and average weight(2 columns totally next to each other) and delete/not import the other columns.i can't identify which columns has each number. is the line ".WebSelectionType = xlSpecifiedColumn" correct?? Any ideas?? I'm not in an advance level of vba so please be kind.tnx in advance!
Sub DownloadDay()
Dim sInput As String
sInput = InputBox("Enter a date in YYYY-MM-DD format")
Call websitee(sInput)
End Sub
Sub websitee(sDate As String)
'
' websitee ÌáêñïåíôïëÞ
'
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.epexspot.com/en/market-data/intraday/intraday-table/" & sDate & "/FR", Destination:=Range( _
"$A$1"))
.Name = "intraday"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedColumn
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
Bookmarks