+ Reply to Thread
Results 1 to 2 of 2

Import specific column from web page in excel using vba code.

  1. #1
    Registered User
    Join Date
    02-08-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    2

    Talking Import specific column from web page in excel using vba code.

    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

  2. #2
    Registered User
    Join Date
    02-08-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Import specific column from web page in excel using vba code.

    no one?? any ideas??

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1