Results 1 to 3 of 3

Need help Importing Data using web query to specific Columns

Threaded View

raghav007 Need help Importing Data... 06-19-2011, 02:20 AM
venkat1926 Re: Need help Importing Data... 06-19-2011, 05:28 AM
raghav007 Re: Need help Importing Data... 06-19-2011, 06:56 AM
  1. #1
    Registered User
    Join Date
    06-19-2011
    Location
    Pune,India
    MS-Off Ver
    Excel 2007
    Posts
    2

    Need help Importing Data using web query to specific Columns

    Hello Friends ,

    I need your help with two issues that am facing.
    Am trying to copy information from a webpage http://tinyurl.com/linktopage2

    It is a directory.Containing links to every member it has. The info on each page is divided in 3 parts. Name , Business Type , Contact Information.

    http://i54.tinypic.com/2j9tm8.jpg
    You can see the image on above link to understand what am trying to do.

    Now my question is , is it possible to have info collected in specified cells the way I am wanting to do.

    And my second question is the macro that am using to fetch information is putting information horizontally in excel.

    Here is the macro.
     
    Sub LoopThrough()
    Dim WSO As Worksheet
    Set WSO = ActiveSheet
    For Each Cell In WSO.Range("A1:A5")
    ThisURL = "URL;" & Cell.Value
    
    With ActiveSheet.QueryTables.Add(Connection:= _
    ThisURL, Destination:= _
    Range("$A$23"))
    .Name = "ListingDetails.asp?MemID=2302"
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = True
    .RefreshOnFileOpen = False
    .BackgroundQuery = True
    .RefreshStyle = xlInsertDeleteCells
    .SavePassword = False
    .SaveData = True
    .AdjustColumnWidth = True
    .RefreshPeriod = 0
    .WebSelectionType = xlSpecifiedTables
    .WebFormatting = xlWebFormattingNone
    .WebTables = "19,""FormPaddingL"",""FormPaddingL"""
    .WebPreFormattedTextToColumns = True
    .WebConsecutiveDelimitersAsOne = True
    .WebSingleBlockTextImport = False
    .WebDisableDateRecognition = False
    .WebDisableRedirections = False
    .Refresh BackgroundQuery:=False
    End With
    ActiveWindow.SmallScroll Down:=-2
    
    Next Cell
    End Sub
    
    Sub Getlinks()
    For Each h1 In ActiveSheet.Hyperlinks
    Cells(hl.Parent.Row, 2).Value = hl.Address
    Next hl
    End Sub
    I am only two days old at programming. So would highly appreciate if anyone here could help me with this.Thanks to all in advance.
    Last edited by raghav007; 06-19-2011 at 06:55 AM.

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