Skip to main content
Share Your Experience: Take the 2024 Developer Survey
17 votes
Accepted

How to know if Google Sheets IMPORTDATA, IMPORTFEED, IMPORTHTML or IMPORTXML functions are able to get data from a resource hosted on a website?

Tl;Dr The importhtml(), importxml(), importdata() and importfeed() functions only work with public pages that do not require signing in or other forms of authentication. Further, if the content of a ...
Rubén - Volunteer Moderator -'s user avatar
13 votes

Why won't importxml work on this sheet?

I created a custom import function that overcomes all limits of IMPORTXML I have a sheet using this in about 800 cells and it works great. It makes use of Google Sheet’s custom scripts (Extensions >...
Josh Bradley's user avatar
7 votes

What are the refresh characteristics of the Google Spreadsheet Import functions?

#Short answer You are right, the import functions updates their result at certain intervals. #Explanation From Change a spreadsheet's locale, time zone, recalculation, and language, a help article ...
Rubén - Volunteer Moderator -'s user avatar
6 votes

How to know if Google Sheets IMPORTDATA, IMPORTFEED, IMPORTHTML or IMPORTXML functions are able to get data from a resource hosted on a website?

(maybe not the answer, but here is a quick humble scraping guide) all starts with disabling JavaScript for the website to see what's left and what's possible to be scrapped the first choice is always ...
user0's user avatar
  • 26.7k
5 votes
Accepted

How to get first element of split Google Sheets

Answered my own question with a little more googling: https://stackoverflow.com/questions/32307788/get-first-item-from-split =INDEX(SPLIT(IMPORTXML("url here", "//title"),"|"),1,1) works.
Neil_P's user avatar
  • 101
3 votes

How can I use JOIN in Google Sheets to create HTML body?

So to start, you want to double each of the quotes inside of your HTML tags for it to show up properly and not cancel out: so class="p1" would be class=""p1"" then for for the the list of p1 ...
Aurielle Perlmann's user avatar
3 votes

Trying to fetch data from www.csgoempire.com with ImportXML function

From a comment to the question That site seems to be using some sort of client-side rendering, meaning that the html page doesn't contain the info you want. Adding the content to the page is done ...
Glorfindel's user avatar
  • 2,311
2 votes
Accepted

Using Google Spreasheet's IMPORTXML Function to Download Selected Multiple Columns

It's not possible to achieve the desired result by using IMPORTXML alone, I think. Instead use Google Apps Script and the XML Service Service. Example: Adaptation of the code taken from the answer ...
Rubén - Volunteer Moderator -'s user avatar
2 votes

Using ImportXML to pull HTML tags along with data

SO it turns out you can do this after all! =importxml("http://stackoverflow.com","//div[@id='qlist-wrapper']//@*")
Aurielle Perlmann's user avatar
2 votes

Google Sheets importxml() can't fetch from eoddata.com

EDIT: So If your interested in trying google apps script, here is short simple script that grabs the piece you want: function getOpenInterest(url) { var found, html, content = ''; var response = ...
Aurielle Perlmann's user avatar
2 votes
Accepted

Import a JSON query from investing.com

You can pull in all those fields using importxml instead of importhtml: =IMPORTXML("https://es.investing.com/equities/facebook-inc","//*[@class='clear overviewDataTable']/*")
Aurielle Perlmann's user avatar
2 votes

How can I IMPORTXML YouTube video count to Google Sheets?

Maybe: =+importxml("https://www.youtube.com/channel/UC8p19gUXJYTsUPEpusHgteQ","//*[contains (@class, 'view-count')]") If you want the number only (say for further processing): =--REGEXEXTRACT(+...
pnuts's user avatar
  • 17.6k
2 votes

IMPORTXML shows "array result was not expanded because it would overwrite data in the C4" error

When importing HTML you have to allow enough blank space (rows and columns) for the imported data. It seems you wish to import a table, so maybe 13 rows and 5 columns per cricketer. Move Sachin down ...
pnuts's user avatar
  • 17.6k
2 votes
Accepted

How can I use JOIN in Google Sheets to create HTML body?

I see what the Asker is getting at, and I have an answer and some advice: First, I should warn you, that down this path lies madness. It may seem like something obvious to do, and it doesn't look ...
hlecuanda's user avatar
  • 569
2 votes
Accepted

Why won't importxml work on this sheet?

Google Sheets have processing limits. The official documentation doesn't describe them but it's possible to found a lot of user posts claiming that the import functions randomly returns an expected ...
Rubén - Volunteer Moderator -'s user avatar
2 votes

Import table using IMPORTXML

You seem to have forgotten to mention what you would consider tidy, but it should be easier to handle your data (assumed to be starting in A1) with a formula such as: =offset(A1,int(2*((row()-1)/2)),...
pnuts's user avatar
  • 17.6k
2 votes

Unable to importxml from this URL

IMPORTXML only is able to access public web resources but he URL in the formula requires user and password so it couldn't be reached.
Rubén - Volunteer Moderator -'s user avatar
2 votes

How to match XPath for Sheets IMPORTXML formula?

In my environment, values from tags couldn't be retrieved. If your situation is the same with me, for example, how about this? Please think of this as one of several answers. https://phlanx.com/...
Tanaike's user avatar
  • 1,081
2 votes

IMPORTXML reading decimal separator as thousands separator

Use the xPath concat function to append a text character to the imported value to force Google Sheets to threat it as text. I.E. the following formula appends a _. =IMPORTXML("http://bvmf.bmfbovespa....
Rubén - Volunteer Moderator -'s user avatar
2 votes
Accepted

XPath Query to Retrieve Element Value and Name

Alternatives Here are alternative approaches to get the data in your preferred layout: IMPORTDATA =IMPORTDATA(url, delimiter) Imports from a URL in CSV or TSV format. =LET(url, "https://home....
Blindspots's user avatar
  • 5,648
2 votes

XPath Query to Retrieve Element Value and Name

Things to have in mind about using xPath on IMPORTXML It supports xPath 1.0. An old version of the IMPORTXML help article mentioned the supported version; the current version points to a third-party ...
Rubén - Volunteer Moderator -'s user avatar
1 vote

Try to use importxml to get the GDP data from wiki, but can't make it

=IMPORTHTML("https://en.wikipedia.org/wiki/List_of_countries_by_real_GDP_growth_rate","table") =IMPORTXML("https://en.wikipedia.org/wiki/List_of_countries_by_real_GDP_growth_rate","//tr[138]/td[@align ...
TheMaster's user avatar
  • 3,342
1 vote
Accepted

Imporxml is not price the data getting syntax error

How about this modification? Modification points : Please escape single quotes in IMPORTXML(). When the formula is imported, please use setFormula(). From : var oilindicators='=IMPORTXML("http://...
Tanaike's user avatar
  • 1,081
1 vote

Trying to pull data from website into Google Sheet

It worked for me when i tried the formula you shared - but additionally this also works: =IMPORTXML("https://www.pgatour.com/stats/stat.194.html","//tr")
Aurielle Perlmann's user avatar
1 vote
Accepted

ImportXML with Google Sheets is not returning the value I would like

IMPORTXML is only able to read values on the source code of the page but the value you are looking for isn't there, it's added by something that modify the DOM (document object model).
Rubén - Volunteer Moderator -'s user avatar
1 vote

Pull information about each game from boardgamegeek.com

Some tools that give the xPath are able to read the DOM of the related page after it was modified but IMPORTXML is only able to read the source code of the page. In these cases, you should use another ...
Rubén - Volunteer Moderator -'s user avatar
1 vote
Accepted

Google Sheets importxml() can't fetch from eoddata.com

Short answer The problem is the xPath, specifically the /tbody part as it's not present in the source code. Explanation The source html code of the page doesn't include the tbody tag. It's added by ...
Rubén - Volunteer Moderator -'s user avatar
1 vote

Google Sheets: How can I combine multiple ImportXML results for multiple URLs into a single column?

Not all the Google Sheets functions are able to work with ArrayFormula. Looks that the import functions (IMPORTDATA,IMPORTHTML,IMPORTRANGE, IMPORTXML) are this kind of functions. A similar answer ...
Rubén - Volunteer Moderator -'s user avatar

Only top scored, non community-wiki answers of a minimum length are eligible