Zachary Kocjancic
Zachary Kocjancic

Reputation: 59

How to scrape an income statement from Yahoo Finance into google sheets

I'm trying to scrape an income statement for Apple (AAPL) into google sheets https://finance.yahoo.com/quote/AAPL/financials?p=AAPL

First off I'd like to say I'm new to using anything technical or function related for computers so sorry if its a dumb question but I'm aware sheets has built in import functions for web data and I tried using the IMPORTXML function and I couldn't find the right xpath for the whole income statement

So my questions are

  1. Which Import function would be best for scraping the income statement into sheets
  2. Whichever function is the best how can I do it.
  3. Would I repeat the steps that you show me if I wanted to scrape the balance sheet and cash flow as well

Upvotes: 0

Views: 932

Answers (1)

Jason E.
Jason E.

Reputation: 1221

It seems that you are trying to fetch dynamically generated data in the link you've provided. Import functions cannot be used or cannot function properly in dynamically generated data as well as in websites which data are being controlled by JavaScript.

I suggest finding another link or website that will provide you with the same data and can be fetched through IMPORT functions by taking into consideration the mentioned limitations above.

Upvotes: 1

Related Questions