Pull data from websites in Google Sheets with IMPORTXML function | Web scraping (Stock prices)

preview_player
Показать описание
Get help with your spreadsheet project, or personalized training:

Get the ultimate formulas cheat sheet

Learn to build dashboards in Google Sheets:

In this video I am going to show you how to pull data from websites into a Google spreadsheet by using the Google Sheets IMPORTXML function. This process of pulling data from websites is called "web scraping". I will show you an example of pulling stock prices as well as a business summary from a website.
Рекомендации по теме
Комментарии
Автор

Awesome delivery of step by step instructions. Truly, the best tutorial I have seen on YouTube. Thank you for showing us how to do this 🙏

steveonthebeach
Автор

Wow thank you!!!! As someone else mentioned I almost gave up trying to pull info to create a database. This helped 1000%. Amazing gained a new subscriber =)

jenni
Автор

Thanks so much for this explanation. Looking forward to more like this.

davewmck
Автор

Hello, thank you for your video. As of now on 15 Nov 2023, I wonder if the IMPORTXML doesn't work for yahoo finance as I followed your video but it doesn't work and N/A or Error was shown after pasting the URL and fullXpath that I got from the inspect section. May I know if this method is no longer working for yahoo finance? Your reply is much appreciated. Thanks

oneguy.
Автор

Thanks for the video it helped me a lot. the function feels like 1990 internet i had try a ton of different websites multiple times until i got it to worked.

johnhill
Автор

In order to not get a parse error, I have to replace double quote marks with single quote marks inside the xml query line on sheets. I'm not talking about the double quotes Sheets uses to discriminate the web url from the xml data; I'm talking about double quotes inside the xml content.

andrewfeazelle
Автор

Hey, did you ever release a video showing how to pull from specific tables or columns? It’s exactly what I am looking for but I don’t see it on your channel. Great video btw

jasonbischer
Автор

Hmm, what do you do when the full xpath that was copied yields an "imported content is empty" error?

dasfahrer
Автор

Hey, great video! Im having a message saying "#N/A", and when I hover over it, it says "Resource at URL not found". Any advice?

apurvpatel
Автор

Great explanation! It helped me further just as I was about to give up. Thanks so much!
I too have encountered the same problems with "loading", error and such described in the comments. But I have also different question: Is it possible to pull in such elements as charts for instance? Using this formula. Could you show an example? or post a code to use in a cell for this? /Much appreciated!

gregerlindstrand
Автор

Thanks, this video explains it very well, but apparently something may have changed since the video was made, and this process no longer works. I can't get the option to copy the "full Xpath", only to copy the "Xpath". Then very carefully doing everything you described in the video, it won't work for me. I get #ERROR! and when I hover the mouse over the cell, it says "formula parse error". Tried it several times, being extremely careful to do it exactly per your instructions. But thanks anyway.

johnterry
Автор

Thanks for the video. I did exactly as per how you do but I got "Loading" in the cell of the Google Sheet. I even choose Tesla & Yahoo finance to make sure I am no difference with your sample.

chk
Автор

Hi. thanks for video. I have a big/little question. If the url have differents <h3> and <p> how i can have a column who follow this order structure and can scrape any h3, p. <h3><p><h3 two> <p two> etc

seosevilla
Автор

Great tutorial.!! I have a question.. I would like to know how import data to google sheet in cells that are already filled by other data. ??

I'm trying to automate my stocks imported financial data (for example: income statement, balance sheet, cash flow statement) but I'm only able to import one by one because google sheet cells are already filled by the first stock data I imported.!

How Can I RESOLVE This Issue.??


Thanks

moneymaker
Автор

Hi, as I am trying this now (April 2023, French interface), I got an error and the thing is ', ' has been replaced by ';' in my case. Hope it will help :)

t.triskell
Автор

thank you for the guide....
i have one problem that sometimes the function is loading for like 20 minutes
what can i do so the data will be pulled more quickly?

barzaltzman
Автор

I got "N/A" when I tried to pull net income. Does it mean the data cannot pulled now?

jennifertao
Автор

Will this work for a website you have to login to? I need to create a separate sheet for several people using data from a CRM (we use Virtuous), with each sheet showing giving history for each month for that person's portfolio. I'm assuming each URL will be different for each person's sheet, but I'm worried it won't work because we have to log in, and not sure which formulas to use after using the URL to scrape?

kaykay
Автор

i dont have the option to copy full xpath only copy xpath. any tips on how to?

Lakelandds
Автор

hi thank you for your great explanation, very helpful. i have a question. can you als get info from a balalnce sheet from yahoo finance / tab financials / balance sheet

hollandamericalinetravelers