0

I've been successful using IMPORTXML to pull into Google Sheets for Enterprise Value and Growth Estimates Next 5 years (per annum) but I'm unable to pull in Free Cash Flow. I have blocked JavaScript to rule out if that is the issue. If someone could help me it would be great? Below are the IMPORTXML methods I have been successful and unsuccessful with.

Enterprise Value:

=IMPORTXML("https://au.finance.yahoo.com/quote/AAPL/key-statistics?p=AAPL","//*[@id='Col1-0-KeyStatistics-Proxy']/section/div[2]/div[1]/div/div/div/div/table/tbody/tr[2]/td[2]")

Growth Estimates Next 5 years (per annum):

=IMPORTXML("https://au.finance.yahoo.com/quote/AAPL/analysis?p=AAPL","//*[@id='Col1-0-AnalystLeafPage-Proxy']/section/table[6]/tbody/tr[5]/td[2]")

Free Cash Flow:

=IMPORTXML("https://au.finance.yahoo.com/quote/AAPL/cash-flow?p=AAPL","//*[@id='Col1-1-Financials Proxy']/section/div[3]/div[1]/div/div[2]/div[12]/div[1]/div[2]/span")`
Rubén
  • 34,714
  • 9
  • 70
  • 166
D-CRUZR
  • 11
  • 3

1 Answers1

1

Sad to say that the link is javascript generated. And IMPORT functions don't work on that.

Testing the link:

Output

Alternative:

  • You can try to find an alternative non-javascript generated site that would provide the same data. See similar situation. Although I can't find exact same data from any other sites, this site seems similar especially on the operating cash flow (aside from TTM values). You might want to check that.

Reference:

NightEye
  • 10,634
  • 2
  • 5
  • 24
  • Thanks, can you please show me how you tested it was in fact using JavaScript? As when I blocked JavaScript through Chrome is still presented the value I was after which made me lead to believe it was non-JavaScript generated value. – D-CRUZR Feb 22 '21 at 22:29
  • As you can see above @D-CRUZR, you only need to make the xpath `"//*"`. If it returns a javascript code, then it is javascript generated – NightEye Feb 22 '21 at 22:32
  • 1
    Thanks, though I think the JavaScript is only in relation to the table and charts that is down the right side of the page. As that is not shown when I block JavaScript. Could I be correct with that evaluation? Regardless I think I need to learn how to use API's as I'm not a huge fan how the IMPORTXML loads. – D-CRUZR Feb 22 '21 at 23:02