Importing a website table into Google Spreadsheet - google-sheets

I am trying to import this table into a Google Spreadsheet:
The table is available here:
https://competitions.lta.org.uk/sport/drawsheet.aspx?id=8D598CDE-8579-4541-B7AD-48558BF6FEA3&draw=4
Before Google changed their Spreadsheet addresses, I had the import working with ImportHTML(URL, "table", 2) - but this no longer works, even though there appears to be only two 'table' labels in the page HTML.
Looking for a way to abstract the table, I went to 'importXML' but tried several versions like 'importxml("https://competitions.lta.org.uk/sport/drawsheet.aspx?id=8D598CDE-8579-4541-B7AD-48558BF6FEA3&draw=4", "//div[contains(#id,'poule')]")'
and the same first part of the statement with "//table[contains(#class,'ruler')]")
but the formula fails with 'no content'
Would really appreciate some help to find a way to import this table!
Thanks in anticipation,

The reason you can't get the table data is because of the cookies page
Every time Google Sheets is trying to access that link, you need to accept cookies, and by default, Google Sheets won't do it.
You need to bypass or accept the cookies from the website to access data, you will need to implement more advanced things in Python or Google Apps Script

Related

Looking to import HTML information into a Google sheet

After multiple test and research I don't have success in importing the data of this table (div) into a Google slide.
None of the formula I tested actually work included this simple test to extract the first column/line "Name":
=importxml("https://ecosystem.lafrenchtech.com/lists/18872/list?showGrid=false", "//span[#class='table-column-text']")
:(
Anyone could help me ?
Thx by advance.
Answer:
I've tested your function on a test sheet and it returns an empty content.
According to an answer at Google Sheets importXML Returns Empty Value , IMPORTXML can not retrieve data which is being populated by a script and it is a limitation. Unfortunately, I have checked that when Javascript is disabled for the ecosystem.lafrenchtech.com site in Chrome browser, the table never loads. Thus, this confirms that the table is being populated by a script and this is the reason why it returns an empty content.
A possible alternative solution is to check if the ecosystem.lafrenchtech.com offers an API, where you can directly get the data that they show from their table using an API key (if it is available). However, this will require you to use Apps Script to parse the data from their API and then post it on your spreadsheet, which would be quite a tedious for a quite simple process.
Note:
On your post, google-slides was the set tag.

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
Which Import function would be best for scraping the income statement into sheets
Whichever function is the best how can I do it.
Would I repeat the steps that you show me if I wanted to scrape the balance sheet and cash flow as well
Thank you for your time
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.

VBA macro to create a list of all URLs connected with one google sheet

Not sure if anyone knows how to do this but could really do with your help,
I have a google sheet that contains 4 or 5 sheets at the moment and that number will increase as we go on,
I have a fantastic piece of code I found that can pull in the data from a Google Sheet Tab using the URL,
however it only does the one tab,
so I was wondering if anyone knows a way to create a list of all the tabs in a google sheets URL's
here is a URL to the first sheet
https://docs.google.com/spreadsheets/d/1G-2PJHClHmI0hrYsV1QxNDzyXG0Kze0IIxzb_n3n6oQ/edit#gid=303111374
so I need a way to go to this then import the URLs for all other sheets
please help if you can, any ideas would be great, also if you have a better way to pull all sheets into excel I'm all ears.

Can text be scraped from Grammarly to google spreadsheet using IMPORTXML function?

I am trying to get texts from the Grammarly application imported into a Google spreadsheet using the IMPORTXML function. To do so, I follow the required syntax IMPORTXML(URL, xpath_query), but it keeps showing an error that the "imported content is empty".
However, the same steps work fine to import data from other websites, and I am confused what might be the matter with Grammarly. Is it because it does allow data scraping at all, maybe?
Thanks for your help. 1 2 3
not possible because this is behind the login gate. google sheets cant read such data

Google Forms/Sheets

I am trying to find a way to link several google forms to one google sheet without separate tabs. I am creating a database so I want different employees to be responsible for different sections of the same spreadsheet.
You need to use "IMPORTRANGE". I had to do that recently. https://support.google.com/docs/answer/3093340?hl=en You have to tell the receiving sheet what range of the feeder sheets to import and then give permission.The trick is, if someone adds columns to a feeder sheet, you have to make sure the data is not "overlapping" in the receiving sheet. Otherwise, you'll get an error.

Resources