Importhtml google sheet not showing the table - google-sheets-formula

I'm trying to import the table from this website
https://diegebetszeiten.de/erlangen-de-diyanet-methode/
to google sheet using
=IMPORTHTML("https://diegebetszeiten.de/erlangen-de-diyanet-methode/";"table";1)
=IMPORTHTML("https://diegebetszeiten.de/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdiegebetszeiten.de%2Ferlangen-de-diyanet-methode%2F";"table";1)
Answer:
#N/A
#N/A
how can I find the correct code of the table shown on the website?
I tried different sites I foun din the source code of the website.

Related

Google Sheets ImportXML Error: Imported XML content cannot be parsed

I'm trying to import stock suggestions into a spreadsheet and have successfully done so from 3 websites, but I am struggling with the 4th.
=IMPORTXML("https://www.tipranks.com/stocks/amzn/price-target","//h3[#class='client-components-stock-research-analysts-analyst-consensus-style__buy'")
Is the command I'm using to try to pull the tag under "Analyst Consensus Rating" from https://www.tipranks.com/stocks/amzn/price-target. But I keep getting:
Error Imported XML content can not be parsed.``` Tips for what I'm doing wrong would be highly appreciated
Google Sheets does not support web scraping of JavaScript controlled elements. you can easily check it by disabling JS for a given site and only what's left visible can be scraped. unfortunately, in your case, that's nothing:

XPath for specific site in Google Sheets

I want to import table shows in below link:
https://www.codal.ir/ReportList.aspx?search&LetterType=6&AuditorRef=-1&PageNumber=1&Audited&NotAudited&IsNotAudited=false&Childs=false&Mains&Publisher=false&CompanyState=0&Category=1&CompanyType=1&Consolidatable&NotConsolidatable=false
it is not possible by importhtml, and I have tried some xpaths by importxml but failed.
this is not an issue of XPath. the website you are trying to scrape is dependant on JavaScript. Google Sheets does not support import of JS elements. your only option is to find the same data you need on some other website. you can test the JS dependency simply by disabling it for a given site and what's left of it can be scraped - in your case, nothing:

Google Sheets Import Function from Fortune 500

I'm trying to import the table of Fortune 500 companies for 2019 into Sheets. I've tried the formula
=IMPORTXML("https://fortune.com/fortune500/2019/search/","//div[#class='ReactTable']")
and some variations of this function but can't get it correct. Any help please?
the website you trying to scrape is under JavaScript control. Google Sheets is not capable of importing JS elements. you can test this simply by disabling JavaScript for a given site and what you are left with is able to be scraped. in your case: nothing:

Stuggling to import from BarChart website

I'm struggling to import data from the barchart.com website
I have tried importing the data presented on barchart.com/stocks/sectors/rankings?timeFrame=matrix without success.
I have tried using IMPORTHTML and IMPORTXML but neither works and I've tried various inputs.
If someone can please assist.
this won't be possible. values which you want to scrape are controlled by JavaScript and Google Sheets does not support JS scraping. you can always test this by temporarily disabling JS on given URL to see what's possible to scrape:

How to find the proper XPath for importxml to import this table in Google Sheets? [duplicate]

This question already has answers here:
Scraping data to Google Sheets from a website that uses JavaScript
(2 answers)
Closed last month.
I would like to import the table on this website http://www1.hket.com/store/general/finance/web/hsioptions_day.html
and have it automatically update.
I have tried several ways to import the table to the sheets using
importhtml("http://www1.hket.com/store/general/finance/web/hsioptions_day.html","table",1)
But it seems it is not a table.
I also tried to import the table using
importxml("http://www1.hket.com/store/general/finance/web/hsioptions_day.html",A1)
as the XPath contains double quote I define cell A1 = //*[#id="table1"]/table
But it seems the XPath is wrong and it doesn't work. I've got an empty content error.
I wonder if anyone could help me to import the table properly into the sheet. Once it can be properly imported, I will try using the google script to update it automatically, using this tutorial
https://www.youtube.com/watch?v=ijaj7CXSg-Q&ab_channel=ArgentEngineering
Would anyone give some ideas to me how to properly import this table to the sheet?
I am an absolute noob in this and any help is appreciated.
I fear this won't work, your page is built with Javascript, which isn't supported by IMPORTXML (or by Google Sheets in general).
all you can scrape from this site is:
=IMPORTXML("http://www1.hket.com/store/general/finance/web/hsioptions_day.html", "//*")
and/or also this:
=IMPORTDATA("http://www1.hket.com/store/general/finance/web/hsioptions_day.html")
as already mentioned Google Sheets can't handle websites controlled via JavaScript

Resources