How do I get Google Finance to stop Rounding up Penny Stocks?
I import a stock in to google sheets using the google finance option and it takes .0162 and makes it .16
Any Help Please!
Related
I want to import data i.e. Issued Cap. and Free Float Market Cap. from this website:
Edit: 11-Jun-2022
https://www.nseindia.com/api/quote-equity?symbol=TRITURBINE
in Company information sector to a Google sheet.
I have tried Importhtml, Importdata and Importxml...but they all give an error or return #N/A.
Any suggestions would help greatly.
import formulae of google sheets do not support the scrapping of JS elements. you can always test this by disabling JS on a given site and usually, what's left can be imported into a spreadsheet. in your case fields are blank:
Until a few days ago this importxml was importing the current price from yahoo finance however it's now stopped working and I can't figure out why. Is anyone able to suggest a fix? Thanks a lot.
=INDEX(IMPORTXML("https://finance.yahoo.com/quote/SGLN.L","//*[#id='quote-header-info']/div[3]/div[1]/div/span[1]"),1)
It seems that Yahoo changed some things in their website and it resulted to the import formula not to work anymore for some of the webpage in Yahoo Finance as well as for some tickers. This is the result of the IMPORTXML command for the SGLN.L ticker and for the AAPL ticker which is still working.
For now, I suggest finding another website/data source that will give you the same information that you need for those unavailable/unscrapeable tickers. Another option would be to wait for yahoo to fix this issue.
This question already has answers here:
Scraping data to Google Sheets from a website that uses JavaScript
(2 answers)
ImportXML not producing correct values [duplicate]
(1 answer)
Closed last month.
I am trying to import option price from Yahoo Finance into my Google sheet using ImportXML but the actual values for some of the prices received in Google Sheet is very different than what I can see on Yahoo Finance website. I even tried ImportHTML and the result is the same.
Formula used in Google Sheet:
=TRANSPOSE(IMPORTXML( "https://finance.yahoo.com/quote/KL220121C00045000?p=KL220121C00045000" ,"//tr"))
Here's the result in Google Sheet (all red cells are the values that are different):
Actual values on Yahoo Finance page:
I am totally clueless why this is happening and how to solve it.
#Tanaike's link to ImportXML not producing correct values answers how to workaround the issue using App Scripts.
To answer the question of "why", I believe Yahoo Finance has implemented some sort of user agent detection, such that requests from Google Spreadsheets, or more specifically requests with the user agent Mozilla/5.0 (compatible; GoogleDocs; apps-spreadsheets; +http://docs.google.com) will be served a different (I believe older) version of the data.
When I visit the link https://finance.yahoo.com/quote/KL220121C00045000?p=KL220121C00045000 in the browser, it currently shows
As of 3:17PM EST. Market open
But when I change my user agent to mimic Google sheets, I get
As of 10:43AM EST. Market open.
Which is the same result as IMPORTXML.
I am guessing they implemented this either to reduce fetching from automated spreadsheets, or to discourage people from scraping their sites using Google Sheets.
This question already has answers here:
Scraping data to Google Sheets from a website that uses JavaScript
(2 answers)
Closed last month.
On SO I often see people inquiring about how to import data from the tables on yahoo finance. I'm trying to import the business description under the profile section from yahoo finance. It seems this would require the importxml function but I'm struggling. This is my function:
=IMPORTXML("http://finance.yahoo.com/quote/AAPL/profile", "//div[#data-reactid='139']")
I think my issue is related to "div" but not sure. Might anyone be able to provide guidance? Thanks!
Sample formula:
=IMPORTXML(A1,"//h2[#data-reactid='139']/../p")
In this case, the URL of http://finance.yahoo.com/quote/AAPL/profile is put in "A1".
I used //h2[#data-reactid='139']/../p as the xpath.
Result:
I am trying to import my Google analytics numbers to google sheets using google analytics add-on. My problem is that numbers for example revenue is downloaded in US format "3212.23" and I would like to have format "3212,23".
I tried to use Importrange to import data to another google sheet, but unfortunately it did not help.
Thanks for your help.
The Google Analytics API returns the data in the standard American format for numbers . being decimal place.
Depending upon what language you have the sheet settings set to that country the default decimal format will be the one for that country.
Google Docs to Spanish Google Docs spreadsheets will by default use
the Spain locale and the date/time and decimal comma used in this
locale.
I would think that you could do a replace of some kind on the . returning from the API on numbers.