Google Apps脚本未返回数据 [英] Google apps script not returning data

查看:101
本文介绍了Google Apps脚本未返回数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Google Apps脚本,它从Google表格中提取数据,该数据是通过GoogleFinance获取数据的(附有图片),价格差"= GOOGLEFINANCE(A2," change)"可以正常工作,但是收盘价称为通过"= INDEX(GOOGLEFINANCE((A3)," close,F2),2,2)"仅返回#REF!

I have a Google Apps Script pulling data from a Google Sheet, which gets data via GoogleFinance, (image attached) the price difference "=GOOGLEFINANCE(A2, "change")" works fine, but the close price which is called via "=INDEX(GOOGLEFINANCE((A3), "close", F2),2,2)" just returns #REF!

屏幕抓取

我已经尝试过getValue和getDisplayValue,但这没什么作用

I have tried the getValue and getDisplayValue, but this makes no difference

for(var i = 2; i < 72; i++) {
   var thePrice = sheet.getRange('B' + i).getValue();
   var sharename = sheet.getRange('D'+ i).getValue();
   var theDifference = sheet.getRange('C'+ i).getValue();
}

推荐答案

历史记录 GOOGLEFINANCE数据无法在Google外部访问 床单.如果您有一个包含GOOGLEFINANCE函数生成的历史数据的电子表格,并尝试下载或通过Apps脚本或API访问它,则相应的单元格将显示#N/A.

Historical GOOGLEFINANCE data no longer accessible outside of Google Sheet. If you have a spreadsheet with historical data generated from the GOOGLEFINANCE function and you try to download it or access it via Apps Script or an API, the corresponding cells will show #N/A.

有关更多信息: G Suite更新博客

此外,它已经在应用程序脚本问题跟踪器中提出,并且得到了Google的回复是"无法解决(预期行为)"

Also, it has been raised in the App Script issue tracker and the response from Google is "Won't Fix (Intended behavior)"

这篇关于Google Apps脚本未返回数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆