Tapan Samaddar
Tapan Samaddar

Reputation: 85

How to make "getValue()" working for me again

I have an existing google spreadsheet + script which was working perfectly. But suddenly stopped working since 1 week back.


In a sheet of my spreadsheet I am using the following command to download 200 days of historical stock prices:

=googlefinance(B1,ʺcloseʺ,today()-200,today())   ; //cell B1 contains the ticker symbol. It populates the values from cell B3 – B142

Now I have a script, in which I am first setting the value of cell B1. Wait for 10 seconds. Then I extract the value of a specific cell (containing a historical price).

var xyz = sheet.getRange('B100').getValues();

This line is not working. When I print the value of xyz it is always empty. However if I pull any other static value from the sheet, I get the value correctly. Any insights, very appreciated.

Upvotes: 0

Views: 113

Answers (1)

Sam Berlin
Sam Berlin

Reputation: 3773

This is unfortunately not supported through the Sheets API or scripts. See https://gsuiteupdates.googleblog.com/2016/09/historical-googlefinance-data-no-longer.html for details.

Upvotes: 1

Related Questions