I am trying to get a specific value from a public company's balance sheet into Google Spreadsheet to better analyze the company financials. I want to add the ticker in one of the cells and via a formula, I will get the Total Current Assets for example.
Is there a way to it?
The main issue is that the data is populated after the page is being rendered, so even if I use the IMPORTHTML and set the right XPath I am getting Imported content is empty. It because the value is since it is being fetched on the on a later script.
I found this service which provides the company's financials in a JSON and CSV formats, but I dont know how to parse it on the googlesheet.
Should be something that someone already solved.
Thanks
Related
I have a simple Google sheet that has 9 fields as shown below
Google sheet data source
When I connect this file as a data source using Google Sheets connector, I get ONLY 7 fields instead of 9 as shown below:
Data Source Editor
There are two missing files that cannot be recognized by GDS which are scenario and feedback fields respectively.
In order to solve this issue, I tried the following:
disconnect and reconnect the data source file again. But it did not work.
Also, I tried to use refresh fields but in vain too.
I tried also.
I could not find any reason for that behavior. please help if you can.
Here is a link to a sample Google Sheet file.
https://docs.google.com/spreadsheets/d/1GIHjwPp0uodUiJeXeX9RVr58hFz2re-6ilZYAeFU_Lc/edit?usp=sharing
Are these missing columns in your original google sheets file also empty? If yes, this is the reason why GDS is not recognizing those table. If you add some value in at least one row of these columns and reconnect the data source, they will show up.
If you intend to keep those columns empty for whatever reason, you can make a row with 'test' as values and filter those out in the report after connecting the data source.
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
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.
Hy, I am using Yahoo Fantasy Football and I have design Google Sheet to get the score data which is the working fine. The link to the sheet is as under.
Google Sheet Link
I have changed the permission to Editor. I have made a drop-down which holds the information of Week numbers. Basically, my idea is that by choosing the week number I want to populate the data from yahoo fantasy football. For importing data, i am using this command.
=importhtml("https://football.fantasysports.yahoo.com/f1/683375","table",1)
and this command is working well.
I tried it by using the same command but it does not works for the week numbers. The source of the page is as under.
so according to the given picture, here is the week number, I want to implement the same in the google sheet by using the dropdown. I have implemented the drop down but it does not work. Is there a way to interlink both using scripts or command so from google sheet when I chose week from the drop-down the concerning data should be populated? please take a look at the Google Sheet given above. I am also getting this error, while it was working fine before, how can it be resolved also.
Thanks
IMPORTHTML cannot retrieve elements dynamically inserted by a script. In your case the content on Week matchups is inserted dynamically and therefore will not be retrieved (it will return empty). Moreover, IMPORTHTML olny gets data from tables or lists and if you inspect what it seemed to be a table in Week Matchup is just actually a series of divs. If the content would not be inserted dynamically, to get the data from these divs you would need to use IMPORTXML.
If you still want to retrieve this information I am afraid that you will need to look for other web scraping techniques.
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.