Results 1 to 2 of 2

Web-scratching with Chrome, Selenium and Excel

Threaded View

  1. #1
    Registered User
    Join Date
    11-14-2020
    Location
    N.A.
    MS-Off Ver
    2016
    Posts
    1

    Web-scratching with Chrome, Selenium and Excel

    Hello,

    I need some help from you.

    I would like to insert the text of a website into Excel as if the website were saved as a txt file.

    I found this macro on the web for this purpose:
    Sub Copy()
    Dim IEApp As Object
    Dim IEDocument As Object
    Set IEApp = CreateObject("InternetExplorer.Application")
    IEApp.Visible = False
    IEApp.Navigate "Link"
    Do: Loop Until IEApp.Busy = False
    Do: Loop Until IEApp.Busy = False
    Set IEDocument = IEApp.Document
    Do: Loop Until IEDocument.ReadyState = "complete"
    zeile = 1
    For Each teil In Split(IEDocument.body.innertext, vbCrLf)
    Tabelle1.Cells(zeile, 1).FormulaR1C1 = teil
    zeile = zeile + 1
    Next
    IEApp.Quit
    Set IEDocument = Nothing
    Set IEApp = Nothing
    End Sub

    It works great and just as I imagined.


    Now comes my request.

    This macro only works with the Internet Explorer.

    But I would like to use the Chrome browser for this.

    I have already downloaded SeleniumBasic 2.0.9, installed the appropriate Chrome driver and established the interface to Excel.

    With this test macro I started Chrome, sent a link and successfully closed it:
    Sub Test()
    Dim driver As New CromeDriver
    driver.Get "Link"
    driver.Quit
    End Sub
    What do I have to change in the upper macro, so that not IE is addressed but Chrome?


    Thanks
    Last edited by Chris23; 11-14-2020 at 05:01 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Just Scratching The Surface
    By Leo D in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-05-2020, 03:24 AM
  2. Replies: 2
    Last Post: 04-26-2020, 02:23 AM
  3. Selenium Basic for Excel VBA References
    By Naveed Raza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2017, 08:12 AM
  4. Selenium fails to launch Chrome
    By AGolinsky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2017, 11:30 AM
  5. Replies: 2
    Last Post: 05-19-2014, 02:18 AM
  6. Launch Chrome from within Excel on a MAC?
    By ChainsawDR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2012, 01:48 PM
  7. Scratching Head!
    By Gordon in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-07-2006, 07:50 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