getvalue

Reading the values of cells that summarize Google Finance data results via Apps Script

青春壹個敷衍的年華 提交于 2019-11-28 02:29:10
Apps Script seems to be unable to deal with a cell that uses the average formula, when the average is over Google Finance data: Consider that column A is full of data from Google Finance. Then you type into cell B1 =average(A1:A100) . Lets assume the average is 5 and as such cell, B1 shows 5. Great, except that using the following script will fail: var AveResult = spreadsheet.getRange('B1').getValue(); ----> The log show a #DIV/0! error On the other hand, if you overwrite the formula in B1 and simply type in a 5 , then it works perfectly: var AveResult = spreadsheet.getRange('B1').getValue();

Reading the values of cells that summarize Google Finance data results via Apps Script

老子叫甜甜 提交于 2019-11-26 18:40:41
问题 Apps Script seems to be unable to deal with a cell that uses the average formula, when the average is over Google Finance data: Consider that column A is full of data from Google Finance. Then you type into cell B1 =average(A1:A100) . Lets assume the average is 5 and as such cell, B1 shows 5. Great, except that using the following script will fail: var AveResult = spreadsheet.getRange('B1').getValue(); ----> The log show a #DIV/0! error On the other hand, if you overwrite the formula in B1