谷歌表importData,importRange速度/间隔-改善方法吗? [英] Google sheets importData, importRange speed / interval - ways to improve it?

查看:94
本文介绍了谷歌表importData,importRange速度/间隔-改善方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据google文档( https://support.google.com/docs/answer/58515?hl = zh_CN )当前的刷新/重新计算时间如下;

According to google documentation (https://support.google.com/docs/answer/58515?hl=en) current refresh/recalculate times are as follows;

要更改某些Google表格功能的更新频率,请执行以下操作:

To change how often some Google Sheets functions update:

打开电子表格.单击文件>电子表格设置.在下面在重新计算"中,从下拉菜单中选择一个设置.点击保存设置.注意:外部数据函数将在以下时间重新计算间隔:

Open a spreadsheet. Click File > Spreadsheet settings. Under "Recalculation," choose a setting from the drop-down menu. Click Save settings. Note: External data functions recalculate at the following intervals:

ImportRange:30分钟ImportHtml,ImportFeed,ImportData,ImportXml:1小时的GoogleFinance:2分钟

ImportRange: 30 minutes ImportHtml, ImportFeed, ImportData, ImportXml: 1 hour GoogleFinance: 2 minutes

有什么方法可以加快速度吗?例如,删除单元格然后替换它将强制刷新数据.也许可以例如通过脚本来完成.甚至可以单独使用脚本从另一个工作表中提取数据吗?

Is there any way in which we can speed this up? For example deleting the cell and then replacing it will force a refresh of the data. Maybe this could be done via a script for example. Can a script even be used on its own to pull in data from another sheet?

有人对如何做到这一点有任何想法吗?理想情况下,我希望每5分钟刷新一次.

Does anyone have any ideas of how this could be done? Ideally I want a refresh of every 5 minutes.

非常感谢

推荐答案

我实际上找到了一个似乎效果很好的解决方案;

I actually found a solution which seems to work quite well;

SpreadsheetApp.getActiveSpreadsheet().getSheetByName("sheet1").getRange('A1').setValue('');
SpreadsheetApp.getActiveSpreadsheet().getSheetByName("sheet1").getRange('A1').setValue('=IMPORTDATA("https://www.dropbox.com/9329382983/file.csv?dl=1")');

  1. 使用importdata公式清除单元格,2.重新添加importdata公式.

然后您可以将此脚本设置为每x分钟运行一次.

You can then set this a script to run every x minutes.

这篇关于谷歌表importData,importRange速度/间隔-改善方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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