+ Reply to Thread
Results 1 to 12 of 12

transition from using IE to MSXML2.XMLHTTP"

  1. #1
    Forum Contributor
    Join Date
    05-17-2016
    Location
    Montreal
    MS-Off Ver
    2013
    Posts
    115

    transition from using IE to MSXML2.XMLHTTP"

    Hey all,

    I'm trying to transition away from using IE because as my list of fetching websites continues to grow things are just getting more and more slower and less reliable to complete the task. I've tried different kind of permutations unsuccessfully and I just can't even get it to convert the object-data into the specific pasted data...
    Please Login or Register  to view this content.
    Any help to get the data to paste row-by-row (doesn't need to be a table, just pasted like IE version) would be much appreciated..

    Note: I have xml v6.0 and html object library reference enabled. If it can be done via WINhttp5.1, then its fine too!
    I just need a working starting point where I can keep building on :p

    Any help would be much appreciated!
    Last edited by Exequiel3k; 05-05-2019 at 03:23 PM.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: transition from using IE to MSXML2.XMLHTTP"


    Hi,

    check first if the desired data exist within the responseText property …

  3. #3
    Forum Contributor
    Join Date
    05-17-2016
    Location
    Montreal
    MS-Off Ver
    2013
    Posts
    115
    Yes, it does exist since I can Msgbox it and see the HTML content..

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: transition from using IE to MSXML2.XMLHTTP"


    Another point : use same URL as your IE code.
    Last edited by Marc L; 04-29-2019 at 09:20 AM.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: transition from using IE to MSXML2.XMLHTTP"


    I just forgot to tell you on my side « threadinfo » does not exist in responseText ! …

  6. #6
    Forum Contributor
    Join Date
    05-17-2016
    Location
    Montreal
    MS-Off Ver
    2013
    Posts
    115

    Re: transition from using IE to MSXML2.XMLHTTP"

    If I run
    Please Login or Register  to view this content.
    I see a msgbox appear with all the html-body/tree inside.. I have XML, v3.0 & HTML Object Library references enabled..
    Is it possible all the html-content is not getting temporarily stored?
    IMAGE URL: https://imgur.com/a/3yAPbMR
    Last edited by Exequiel3k; 04-29-2019 at 10:44 AM.

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: transition from using IE to MSXML2.XMLHTTP"


    But you did not check what it really contains ‼

    Just check using InStr VBA function on responseText for "threadinfo" and if it returns zero, that means not found …

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: transition from using IE to MSXML2.XMLHTTP"


    And as yet written, use exactly same URL as your IE version which is not the case here with strData (WTF ! Explain or remove it !) …

  9. #9
    Forum Contributor
    Join Date
    05-17-2016
    Location
    Montreal
    MS-Off Ver
    2013
    Posts
    115

    Re: transition from using IE to MSXML2.XMLHTTP"

    You're right, it returns nothing.. So the fetching isn't even working right.
    I'm gonna have to do some soul-searching :p

  10. #10
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: transition from using IE to MSXML2.XMLHTTP"


    Your first issue is using MSXML2.XMLHTTP, do your request with WinHttp for example and check …

  11. #11
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: transition from using IE to MSXML2.XMLHTTP"

    You also need to parse the string into an HTML document when it's returned - a string doesn't have a getElementsByClassName property.

    You need to create an HTML Document and load the string into it

  12. #12
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: transition from using IE to MSXML2.XMLHTTP"


    Yes, this is the second issue that I planned to talk later …

+ 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. [SOLVED] WinHTTP (or XMLHTTP) bypas "the hostname in the certificate is invalid or doesn't match"
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-22-2018, 10:11 AM
  2. userform transition suddenly "flickering"
    By reploglejj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-22-2015, 10:44 PM
  3. [SOLVED] Strange problem on web extract using MSXML2.XMLHTTP / WinHttp.WinHttpRequest.5.1
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2013, 05:13 AM
  4. CreateObject("MSXML2.XMLHTTP") put CCS tables into excel sheet ?
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-27-2013, 07:35 PM
  5. How does the MSXML2.XMLHTTP object connect to the same session
    By paranidharan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2013, 04:38 PM
  6. XMLHTTP.ResponseBody / XMLHTTP.Responsetext Paste into Excel Sheet
    By gophins in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-11-2012, 11:38 AM
  7. MSXML2 - getElementsByTagName()
    By hoopz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2006, 03:41 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