+ Reply to Thread
Results 1 to 2 of 2

Macro to transfer information from html to excel

  1. #1
    Registered User
    Join Date
    11-06-2017
    Location
    iran
    MS-Off Ver
    2013
    Posts
    4

    Macro to transfer information from html to excel

    My urls are in sheet1 and column 1
    All of them are just url Instagram

    I'm looking for a macros that only download line 160 and 245
    Just line 160 and 245 which contains information from the profile

    If any of the information in this line is transferred to the side cell left in sheet1 for each url They will be updated easily.
    All in one row and each part in a cell.
    I wrote the code below, but it's an amateur macros

    Sub get_line()


    Dim wb As Object
    Dim doc As Object
    Dim sURL As String
    Dim lastrow As Long
    Dim n As Integer

    lastrow = Sheet1.Cells(Rows.Count, "A").End(xlUp).Row
    For i = 2 To lastrow
    Set wb = CreateObject("internetExplorer.Application")
    sURL = Cells(i, 1)
    wb.navigate sURL
    wb.Visible = False
    While wb.Busy
    DoEvents
    Wend
    'HTML document
    Set doc = wb.document
    Cells(i, 2) = doc.body.innerText
    myarray = Split(Data, vbCrLf)
    err_clear:
    If Err <> 0 Then
    Err.Clear
    Resume Next
    End If
    wb.Quit
    Next i

    End Sub



    for test, insert the Instagram url into the sheet1 in A2

    if open html For all Urls instagram in line 160 and 245 There are 5 items
    I want these items to be downloaded sheet1. in a row and five cell .Enter the same URL row.
    In the picture below, you can see what I mean

    Thanks dear friend who helps mehttps8_picofile_comfile8336897192Untitled_picture_png.png
    Last edited by kapriano; 09-10-2018 at 11:25 AM.

  2. #2
    Registered User
    Join Date
    11-06-2017
    Location
    iran
    MS-Off Ver
    2013
    Posts
    4

    Re: Macro to transfer information from html to excel

    thanks
    this problem resolved .

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to transfer information to Word or Publisher
    By Magnis89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-17-2015, 03:29 PM
  2. Combining two macro scripts (html information to excel)
    By hfrankl1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2012, 03:27 PM
  3. extract information from webpage html tags to excel
    By b.hill in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-06-2012, 01:24 AM
  4. Replies: 2
    Last Post: 02-16-2010, 03:53 PM
  5. Transfer information into Excel spreadsheet
    By Linda in forum Excel General
    Replies: 0
    Last Post: 01-17-2006, 08:50 PM
  6. Using a macro how do I transfer information from excel to word.
    By pandacordova in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-30-2005, 03:45 PM
  7. how do I transfer information from excel to an existing word document using a macro
    By sweetiez1114 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2005, 09:06 AM

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