IMPORTHTML, IMPORTXML Functions - Google Sheets Tutorial to Extract from Web Pages to Spreadsheets 2

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 137

  • @TheOneWhoMightBe
    @TheOneWhoMightBe 4 роки тому +2

    I had been trying to figure out how to do a similar thing to getting the 'second column' data, and this gave me the exact answer I was looking for!

  • @tasmedic
    @tasmedic 7 років тому +1

    Thanks ever so much for this. It encourages me to play with the functions, which, for me, is the best way of learning stuff like this!!

  • @trueg261191
    @trueg261191 4 роки тому +2

    Thank you for the information, you helped with a web scraping assessment I needed for a job role. Merci beaucoup!

  • @prameshgyawali9732
    @prameshgyawali9732 4 роки тому +2

    Hi, I have been able to create a stock portfolio watching your videos on Import html/xml functions. I am grateful to you. Can I make my portfolio auto refresh ? Could you please leave me a suggestion.

  • @William_sJazzLoft
    @William_sJazzLoft 4 роки тому

    I will likely download my sheet from Drive to work on it in Excel. This was an excellent tutorial.

  • @geeebeeez
    @geeebeeez 4 роки тому +1

    how can i import table which is visible only when certain tabs are pressed on site:
    for eg. on this url : in.tradingview.com/markets/stocks-india/sectorandindustry-sector/
    i want to import table visible under the "performance" tab rather than "overview"

    • @binodmaharjan9981
      @binodmaharjan9981 4 роки тому

      @Gohit Bhat I am also having same problem. Did you find any solution? In my case, data table is splited into 2 pages. merolagani.com/StockQuote.aspx I am able to get data from page 1 but not able to get data from page 2 from that url.

    • @geeebeeez
      @geeebeeez 4 роки тому

      @@binodmaharjan9981 couldn't find solution. it runs javascript to fetch data on web.

  • @argonaut119
    @argonaut119 3 роки тому +1

    Interesting way to do web scrapes! Just grabbing the desired column solved your problem. Going to try that.
    Some questions on your methods. How did you get your "Inspect" web pages to come up? I am using Chrome and I see a totally different Inspection window. Yours looks much more helpful. Do you have a more basic video on how to inspect and look at the structure of a web page? My Inspect is just not too helpful.
    Also, I am trying to web scrape some financial info, and when I use IMPORTHTML or IMPORTXML, it is really slow and puts up a "Loading..." message for a while (some times Seconds or Minutes, sometimes it does not finish loading). This also happens when doing IMPORTRANGE calls from other spreadsheets (but I am not sure if these 2 problems are related or not).
    There is a definite performance problem with these IMPORT commands. Is this common? Could it be that the IMPORTHTML command is trying to download some tables that are very big? My performance issue even occurs even downloading a 3 row-2 column table from the web. Any ideas or thoughts that I could try? Thanks.

  • @optimallc5233
    @optimallc5233 5 років тому +3

    How to import data from sites with login and pass??? need help on this

    • @Drone-pk
      @Drone-pk 3 роки тому

      Do tell me also

  • @alish3096
    @alish3096 4 роки тому +1

    will this function make an autmation for the sheet?

  • @rebelresin5997
    @rebelresin5997 6 років тому +1

    Great video my friend. At the end of the video you had mentioned you can do this with a product grid. Is there a video on this? Or any help on that would be amazing

  • @OmDetox
    @OmDetox 7 років тому +1

    Thanks for the help. How can you now get the url from the items in the list? lets say I want to have a list of all the communities and the link to the pages about those communities?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  7 років тому +2

      This should do it
      =IMPORTXML("en.wikipedia.org/wiki/Community_areas_in_Chicago","//table/tr/td[3]/ul/li/a/@href")

  • @jameswotring9432
    @jameswotring9432 5 років тому +2

    With this kind of import, does it update automatically if the table was updated on the website? if not is there a way to do that?

    • @3kleft
      @3kleft 5 років тому

      I´m wondering the same thing.

    • @3kleft
      @3kleft 4 роки тому

      @mikell Hey! Thanks for the info; I'm not really good at making scripts. Could I reach out to you or find some way to get help? Thanks again.

  • @joguland
    @joguland 2 роки тому

    how about divs? is it possible?

  • @SELF213_
    @SELF213_ 5 років тому

    Are we able to edit the table once its imported to google sheet? For example I would only want one column from the table. Also will it keep updating live everytime the table is updated throughout the day?

  • @TheOgi22
    @TheOgi22 5 років тому +2

    05:57 - WTF????? Why this is work with word "list"???
    Where in the page code is this word?????
    I totaly not understeand why is this work.
    In page code is "ul" not "list".
    09:08 - Hey this "//table/tr" is impossible to work!
    Correct is "//table//tr"

    • @rhinozz43
      @rhinozz43 4 роки тому

      5:57 google sheets is programmed to accept "list" so any random person can use it.
      9:08 /tr does work because the root node and the current selected node are the same.

  • @Edward-ko9pn
    @Edward-ko9pn 4 роки тому

    What browser are you using? Thanks

  • @takaakiyamada7294
    @takaakiyamada7294 3 роки тому

    Google Spreadsheet is so powerful! Thank you. :-)

  • @brunocesar2283
    @brunocesar2283 4 роки тому

    Is it possible to use the importdata function to bring an account's contact data?

  • @moneymaker8227
    @moneymaker8227 2 роки тому

    Good 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 (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

  • @pankajthakur5531
    @pankajthakur5531 5 років тому +3

    sir plz make video on how i extract live data continue from sites in google sheet plz sir make video on it i m waiting for this concept,

  • @reyanngonzales5891
    @reyanngonzales5891 2 роки тому +1

    I've tried this on one of our tools that is not publicly available (meaning you have to log in). And Its giving me an error. I dont know if there is another step so it would automatically extract the data. | Idont know if this would help but table class in "inspect" is "widefat". Hope you can accommodate my inquiry

  • @craigviner4530
    @craigviner4530 3 роки тому

    Do all websites allow this? On inspecting the website I want to get info from I can see the table I want, but when inputting the formal into Google sheets it can't be found? Wondering if some websites block this functionality?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 роки тому

      No, the page must be loaded by the server, not by javascript for this to work. As javascript loaded websites are slowly taking over the web, this will progressively work on less & less sites.

  • @ОлжасТольмухамет
    @ОлжасТольмухамет 6 років тому +2

    if data on website changins its changing in real-time in sheet?

  • @arklory4674
    @arklory4674 4 роки тому +1

    Wow your the best

  • @felixmorris8379
    @felixmorris8379 Рік тому

    Hi - I'm trying to import a table from a website however after inspecting the code, it looks like the table is populated with angular content (ng_content), and therefore the importXML function is not working as the table I'm trying to import from (I'm assuming) looks empty to the computer. Is there a way I can import the angular content data?

  • @RobertLongM
    @RobertLongM 4 роки тому

    Would Table[1] bring in only the first Table's text?

  • @RobertLongM
    @RobertLongM 4 роки тому

    What if the Inspect - just has as class?

    • @LanceJarvis1959
      @LanceJarvis1959 4 роки тому +2

      Hi, you've probably got an answer for this by now but just in case you haven't -
      I experimented with using '//div' instead of '//table' and it worked :) Drilling down further into the div I used '//div/p[1]' for the first line of data in the div and then found I could use '//div/p[1]/a[1]' to get the first piece of data in the first link in the first line.
      I hope you find this useful.

    • @RobertLongM
      @RobertLongM 4 роки тому

      @@LanceJarvis1959 I actually didn't! I believe I did okay around with that ... I'll try again. If I fall I sent you the URL
      Thank You!

    • @LanceJarvis1959
      @LanceJarvis1959 4 роки тому

      @@RobertLongM Not wishing you a failure or anything, but please do. :)

  • @RobertLongM
    @RobertLongM 4 роки тому

    I used importHTML with "Table",8 and it works, but I want to learn how to use the IMPORTXML in the same way - so do you do IMPORTXML and use the path as "//table[8]" ?
    I doesn't work

  • @shrikantnikam2426
    @shrikantnikam2426 4 роки тому

    I want get data from local market price list and make graph

  • @senjuzumaki
    @senjuzumaki 5 років тому

    how would i do this for lets say getting the dividend yield for a stock from yahoo finance page

  • @tgiardina08
    @tgiardina08 2 роки тому

    What do you do if the table has a unique name instead of a number?

  • @9ebooks
    @9ebooks 5 років тому

    How to change the url inside the fonction from a list of keywords

  • @newborn7850
    @newborn7850 4 роки тому

    Thanku , Pls can u tell me how to reverse .
    I want to import from Google spread sheet one row at a time and display in HTML page

  • @Gilmour101Li95
    @Gilmour101Li95 4 роки тому

    Thanks a lot for this video, unfortunaly, I search the way to recover data from my gmail... I receive email on html format with table, and I dont manage to use this fonction with this because I have not an URL to give at IMPORTHTML... How can I do it ??

  • @bdonato11
    @bdonato11 5 років тому

    When I use importHTML it frequently won't update. If I go in and change the table from 1 to 3 and back again, it finally loads. What is the best way to function to load?

  • @muhammadnauman3048
    @muhammadnauman3048 7 років тому

    one more thing , my web contain agent data .i checked the source the name of agents are in //a/href . in tried this in function as //a/@href but its showing wrong data. any help woould be appreciated.

  • @sunnyjones1064
    @sunnyjones1064 5 років тому

    Thanks a lot brother..... May God bless you much

  • @1egend204
    @1egend204 4 роки тому

    What is best method to import data from JavaScript rendered pages

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому +1

      Check out on my other channel ua-cam.com/play/PLRmEk9smitaXljDN2CjwZ96o4Aj87iuC5.html

    • @1egend204
      @1egend204 4 роки тому

      @@ExcelGoogleSheets Thankyou

  • @nimmueh
    @nimmueh 4 роки тому

    Is it dynamic? Will values change automatically along with the page?

  • @vivisaens3487
    @vivisaens3487 4 роки тому

    Excuse me, I have a question,
    When I apply =importxml(".....", "//table")
    All the data compare in the only cell that I selected, how is it possible? How can I solve this problem? Thank you

  • @WeMakeItEasy
    @WeMakeItEasy 5 років тому

    Thank you very much - For people in Europe - if it doesn't work then use ";" instead of "," as seperator :-)

  • @christianauner1890
    @christianauner1890 4 роки тому

    Hi there. I watched the video and tried it myself but unfortunately it doesn't work. I think I'm making a mistake or the link I have is wrong. I received a link from my dealer where I can get the XML file. These are then only displayed as text in the browser. I would like to import them into Excel or Sheets for analysis. But unfortunately it doesn't work. Maybe you could help me? Best regards

  • @ssp281
    @ssp281 4 роки тому

    how to extract data which is depend on selection on site

  • @DavidElstob73
    @DavidElstob73 3 роки тому

    Superb, my friend. Thank you.

  • @top_cat26
    @top_cat26 7 років тому

    thanks my friend,
    Greetings from Chile

  • @muhammadnauman3048
    @muhammadnauman3048 7 років тому

    Hi tried this & succeed but importXML only pulling 1st page my web contains approx 100 .please advise how to pull all pages with on functions

  • @cutiepets664
    @cutiepets664 4 роки тому

    How to import a graph data??

  • @webserviceargentina7025
    @webserviceargentina7025 4 роки тому

    Hello from Argentina, i need UPDATE CELL OR PAGE every 5 minutes, who is apps script i would be use for this?? thanks for your attention

  • @andersballe16
    @andersballe16 3 роки тому

    Im trying to import a list from a website with checkmarks When I copy it copes into 3 columns:
    Column 1 - number
    Column 2 - blank (because of checkmark)
    Column 3 - name of the item.
    How can I import only number into column 1 and name of item into column 2?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 роки тому

      =QUERY(IMPORTFORMULA(link,args),"SELECT Col1, Col3",0)

  • @marcustan6184
    @marcustan6184 4 роки тому

    I’m very curious, what keyboard and mouse are you using? It’s always so satisfying to hear them click 😂

  • @Basudeb_Chandra
    @Basudeb_Chandra 4 роки тому

    "resource at url contents exceeded maximum size" how to cover up this problem?

  • @andriisev
    @andriisev 4 роки тому

    How to import price from Newegg?

  • @RobertLongM
    @RobertLongM 4 роки тому

    Wow - Great work
    Odd that HTML Tables / Divs can get parsed with XML import? I always assumed XPath is for XML code

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      It is, but they both have similar structure so you can parse HTML with XML parsing tools.

  • @HagridThoughts
    @HagridThoughts 5 років тому

    Can you import tables from Google Docs?
    I want to update a table in a Google Doc and the data automatically be updated in a Google Sheet

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому +1

      You'll need to write a script for that.

    • @HagridThoughts
      @HagridThoughts 5 років тому

      Learn Google Spreadsheets okay thanks!
      Random Question: If I create a script project file in one spreadsheet, how can I import that project file into another spreadsheets?

  • @jibinpeter
    @jibinpeter 6 років тому

    I tried to grab data from NSE India website and finds not working with the function =importhtml(“www.nseindia.com/live_market/dynaContent/live_watch/equities_stock_watch.htm”,”table”,1). Can you suggest possible corrections..

  • @techie577
    @techie577 6 років тому

    That was very useful, thank you for the help!

  • @duplishop
    @duplishop 7 років тому +1

    "ERROR" when I copy your formula in my own google sheets. Can you help me please ?

    • @JasonNosajasoNosaj
      @JasonNosajasoNosaj 6 років тому +1

      An updated formula in the sample spreadsheet would be helpful

  • @friendscafe6870
    @friendscafe6870 4 роки тому +1

    easy and great...

  • @salvatorezaccaria3903
    @salvatorezaccaria3903 4 роки тому

    HI great video... but I have a problem with this formula =IMPORTXML("en.wikipedia.org/wiki/Community_areas_in_Chicago";"//table/tr")... my google sheet works with semicolon instead of comma... So what is the problem? Can you help me? The error that I notice is "the imported subject is empty"... Thanks

  • @rafsan_jane
    @rafsan_jane 7 років тому

    Hi, I think its only work on Wiki, I try other sites but it does not work.
    Any way to use other sites or directory sites?
    Thanks

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  7 років тому +2

      It will work on sites where HTML is fully loaded on initial page load. Any page that is built by adding content with JavaScript won't work.

  • @AlexSmith1
    @AlexSmith1 5 років тому

    How does one import data behind a credentialed barrier?

  • @generallesson9305
    @generallesson9305 3 роки тому

    I am tried but unsuccessful. The web page is not comming like yours.

  • @ghayas76
    @ghayas76 3 роки тому

    Very nice learning video. Sir, How to import .xls file from weblink directly to google sheets?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 роки тому

      I don't think you can do it directly. You'll need to use some sort of service in the middle.

  • @jitendrachampati508
    @jitendrachampati508 4 роки тому

    Hi sir,,, but I can't import data from Yahoo finance to Google sheet

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому +1

      To get dynamically generated data use this ua-cam.com/play/PLRmEk9smitaXljDN2CjwZ96o4Aj87iuC5.html

  • @dracutden2
    @dracutden2 5 років тому

    what if the website is a ".php"

  • @poptanivinod
    @poptanivinod 7 років тому +3

    i tried lot of times every time i got errors help me

    • @Mikarevival
      @Mikarevival 7 років тому

      =importxml("xxx";"//table//tr//td[4]") --> use double /

    • @onarberrade9310
      @onarberrade9310 5 років тому

      do =IMPORTHTML("en.wikipedia.org/wiki/Community_areas_in_Chicago";"table";1) instead of =IMPORTHTML("en.wikipedia.org/wiki/Community_areas_in_Chicago","table",1)

    • @giamar3026
      @giamar3026 5 років тому

      @@Mikarevival One thing to take in count, in some countries as mine,, the "," should be replace with ";", other case doesn't work

  • @dwightaguinaldo3421
    @dwightaguinaldo3421 4 роки тому

    I'd like to extract just the Forward Dividend from this site =IMPORTHTML("finance.yahoo.com/quote/XOM?p=XOM&.tsrc=fin-srch","table",2) In this example, the answer is "3.48" How can I find the path to extract just the dollar amount instead of the whole table?

  • @moazzumgillani4852
    @moazzumgillani4852 Рік тому

    Wowwww!!!!!, Love ir

  • @travisdejong2354
    @travisdejong2354 6 років тому

    I managed to import my data from Wikipedia but I can't delete or change text.

  • @praveenchandrasekaran7064
    @praveenchandrasekaran7064 4 роки тому

    I have few questions.
    1. How to count the words in the page
    2. I use more than 8 import function it's take more time to load. Kindly give few tips to load faster.
    3. I use this method for more than 10 url's In my single page I have more than one h1. So use this method it's come to next row. How I get everything in one cell.

  • @gosthwriterful
    @gosthwriterful 6 років тому +1

    Hi,
    Thank for your explanation! It works! GREAT ☺😀
    But i need more help. What do I have to do when in a web page there is table with a 'information details' button, which actually is an hyperlink to another page?
    Does it exist any formula or solution that can help me?
    May I write you in private, please?
    Thanks for your precious support!
    Micol

    • @sanjibpramanik9268
      @sanjibpramanik9268 6 років тому

      So, you can click on the 'information details' button through your web browser to open the page, then copy the url, and use it on formula, but you also need inspect that the content of the page is html or XML, if it XML then use 'importxml' formula. I don't know exactly but this may help you.

  • @dgiri2333
    @dgiri2333 7 років тому

    How to importXML from Truecaller on Google shit

  • @francisabellana780
    @francisabellana780 4 роки тому

    Thank you!

  • @mikemccartneyable
    @mikemccartneyable 7 років тому

    Superb, thanks

  • @karthikdarkangle
    @karthikdarkangle 6 років тому

    How do i import specific price from a website to google sheets (Ex: "www.amazon.in/gp/product/B06W55K9N6/ref=ox_sc_act_title_4?ie=UTF8&psc=1&smid=A14CZOWI0VEHLG"
    price tag is 5899
    and i want it to display only the price in spread sheet)

  • @RobertLongM
    @RobertLongM 4 роки тому

    How do you work with DIV ID / CLASS on a page with so many sub elements? For example - if you go to this website (BLOCK LOCATION) it will show a full USA Results on left as well as on a map.
    www.heatstoprefractorymortar.com/dealers/
    I want to see if I can pull that list which is in div[@id='wpsl-stores']
    If I use that - =importxml(A1,"//div[@id='wpsl-stores']")
    the result is NULL (Blank)

  • @probuildjohnsonify
    @probuildjohnsonify 4 роки тому

    Yeah Still Dont Work....

  • @rsolsjo
    @rsolsjo 3 роки тому

    Just tried this. Keep in mind you have to use brackets now, so it's like this:
    =IMPORTHTML("en.wikipedia.org/wiki/Beat_It"; "table"; 1)

  • @dannfish
    @dannfish 5 років тому

    This info is great. I need to get some baskeball team stats imported for some reason the 7th table on this website "www.basketball-reference.com/leagues/NBA_2020.html#opponent-stats-per_game::none" does not come up. Can anyone help me correct this formula "=IMPORTHTML("www.basketball-reference.com/leagues/NBA_2020.html#opponent-stats-per_game::none","table",7)"? Thanks for the content

  • @viveksawant8401
    @viveksawant8401 5 років тому

    how can i reduce refresh time from 1 hr to 15 min?

  • @Gamesofmach
    @Gamesofmach 7 років тому

    Man you would try more difficult site.. like ecommerce

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  7 років тому

      You may want to watch this one instead ua-cam.com/video/pwZ44kAeiOo/v-deo.html

  • @cuneiformscript2665
    @cuneiformscript2665 4 роки тому

    🙏🏻

  • @jelenaadamlje9836
    @jelenaadamlje9836 7 років тому

    Doesn't work:-)

  • @ronyjoseph529
    @ronyjoseph529 5 років тому

    Great video, thanks.:)
    CAn i import the contents from UA-cam: "ua-cam.com/channels/8p19gUXJYTsUPEpusHgteQ.htmlvideos?view=0&sort=da&flow=grid" to sheets? I tried importhtml with 'list' element, but entire list is not coming up.
    Please help, Thanks.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому +2

      UA-cam now loads a lot of its HTML using JavaScript, so these functions are not likely to work very well.

    • @ronyjoseph529
      @ronyjoseph529 5 років тому +2

      @@ExcelGoogleSheets Yeah, I understood. Thanks very much for replying. I've copied the contents of your UA-cam Channel (Cmd+A) and arranged to get the list.
      This is the sheet with list of your channel videos:
      docs.google.com/spreadsheets/d/16uw9viUNSVLX4MWP_JOW9Dum3rsUollwDh16cZAFReQ/edit?usp=sharing