+ Reply to Thread
Results 1 to 8 of 8

Streaming Data behind a Java Script

  1. #1
    Registered User
    Join Date
    11-10-2010
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    12

    Streaming Data behind a Java Script

    Hi All,

    I am looking to stream data from a website that is behind a java script. Specifically the website is here:

    http://www.cmegroup.com/trading/agri...penOutcry.html

    If you click the link, you will notice that the website takes a few moments before it starts retrieving the data from its actual source. I've tried using the "Get Data from an External Web Page" tool, but it doesn't stream the data because all I get is data before it starts streaming from the actual source. (In other words I get a bunch of hyphens.)

    Is there anyway to obtain the data that comes a few seconds after?

    Specifically I am hoping to obtain the value in the "Prior Settle" column, so I don't need the data to actually stream. I just require the closing price of the contract. I'm looking to use whatever macro /add-in / tip you guys give me, across different markets so it would also be helpful if you clarify what else I might need to change when looking at a different market.

    Thanks for the help!

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Streaming Data behind a Java Script

    See attached file, I hope it's what you need.

    Regards,
    Antonio
    Attached Files Attached Files

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,646

    Re: Streaming Data behind a Java Script

    Or, with minimum writing into the worksheet:

    Please Login or Register  to view this content.



  4. #4
    Registered User
    Join Date
    11-10-2010
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Streaming Data behind a Java Script

    Hi snb,

    Thanks for the help/code, I'm a little busy right now so I wasn't able to check your code to see if it works, but I appreciate the help anyways. Thanks.

    Hi Antoka05,

    Thanks for the help! Much appreciated. I'm testing it across the markets I'm using (modifying for sheet name and url). However for some reason it did not work for this link:

    http://www.cmegroup.com/trading/inte...sury-bond.html

    I get the following error:

    An Error Occurred: 91 - Object Variable or With Block Variable not set

    Is there a way around this?

    Please Login or Register  to view this content.
    Last edited by Johnny_Drama; 11-12-2010 at 11:52 AM.

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,646

    Re: Streaming Data behind a Java Script

    No problem with:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-10-2010
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Streaming Data behind a Java Script

    Hi SNB,

    Thanks for your help, but for your code I get the error that internetexplorer has not been defined as a type?

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,646

    Re: Streaming Data behind a Java Script

    You have to activate/check the reference (Menu Bar in VBEditor/Extra/references/Microsoft Internet Controls)

  8. #8
    Registered User
    Join Date
    11-10-2010
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Streaming Data behind a Java Script

    Thanks SNB! It now works for ZB. I'm really busy today, but I'm gonna test it across the markets I'm using tomorrow and if it works on all of them then I'll mark this thread solved.

    For those in the future who have the same problem and come across this thread, the reference that SNB refers to is under Microsoft Browser Helpers in Excel 2007. (VBA-->Tools-->references-->Microsoft Browser Helpers)

+ 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