Replicating the ImportXML function from Google Sheet in EXCEL

Copper Contributor

How do I replicate in EXCEL this ImportXML function that returns the content of the table of a stock option contract like AAPL200918C00395000 at https://finance.yahoo.com/quote/AAPL200918C00395000?p=AAPL200918C00395000 . 

 

The Google Sheet implementation is as follows and its results are attached:

=IMPORTXML(("https://finance.yahoo.com/quote/AAPL200918C00395000?p=AAPL200918C00395000"),"//tr")

 

Help much appreciated.

 

3 Replies

@JohnTertx1204

If copy/paste your formula to Google Sheets it returns

image.png

 In Excel you may Power Query from Web, transform and return two tables

 

@JohnTertx1204 

Was not able to insert second screenshot, here it is

image.png

@JohnTertx1204 

 

Where do you do your options trading? I ask because, as a Fidelity client, I've been just downloading the kind of Options data you're talking about for years, from Fidelity's Active Trader Pro. I don't know for sure, but would be surprised if most of the larger financial services firms don't offer competitive products.

 

The data is real-time, not 20 minutes delayed......granted, it is immediately a bit out of synch, but unless you're day trading that shouldn't be a problem.

 

Anyway, another idea.