[英]How to import historical data (CSV) from Yahoo Finance in SpreadSheets
[英]How to Import Historical Data from Yahoo Finance into Google Sheets and make it Auto-Update?
我一直在尝试将 Yahoo Finance ES 符号每日 OHLC 数据导入 Google 表格。
我检查了禁用 javascript 并通过@Rubén重新加载页面方法,并且在重新加载页面后显示 OHLC 数据。 但是 IMPORT 公式#N/A Resource at URL Not Found
。
我还在这里尝试了@user0方法(保存 IMPORTJSON 方法) ,但也没有运气。
然后我测试了@JohnA的脚本,它确实检索了数据。
这是我得到的@JohnA Script output 。
但现在我想知道如何让它至少每天自动更新(它是每日数据)。
我不确定如何继续,因为@JohnA 的脚本涉及处理CSV
文件。
我已经启用calculation on change and every minute
如下所述: 如何为 Googlesheets 配置自动刷新
是否有任何解决方法允许将数据放入 Google 表格而不需要 csv 步骤?
或者,在让 Google 表格每天自动更新的同时,是否仍然可以从CSV
中提取数据? 如果是,该怎么做?
感谢您的任何建议,总是非常感谢!
@Tanaike 1的相关脚本@Tanaike 2
在脚本编辑器中查找时钟
然后填写表格
或者,您可以通过脚本设置触发器
/**
* Creates time-driven triggers
*
* https://developers.google.com/apps-script/reference/script/clock-trigger-builder
*/
function createTimeDrivenTriggers() {
// Trigger every day at 04:00AM CT.
ScriptApp.newTrigger('csvDaily')
.timeBased()
.everyDays(1)
.atHour(4)
.create();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.