将数据从Google表格复制到Excel [英] Copy data from Google Sheet to Excel

查看:175
本文介绍了将数据从Google表格复制到Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实际上想每隔几分钟运行一次VBA宏,并使用Google表格中的信息.我尝试使用发布到网络"选项,但是由于数据量大,刷新时间超过5分钟.我也不想每隔几分钟导出或另存为Excel文档,因为这需要自动化.我也不想使用RPA.

I want to essentially run a VBA Macro every few minutes with information from a Google Sheet. I have tried using the "Publish to web" option, but it takes more than 5 minutes to refresh due to the size of the data. I also don't want to export or save as an Excel doc every few minutes as this needs to be automated. I also don't want to use RPA.

我仅想在Google表格中每隔几分钟将一系列数据传输到Excel中.

I merely have a range of data in a Google Sheet that I want to transfer into Excel every few minutes.

有什么想法吗?

推荐答案

保存/导出到Excel也可以自动进行(使用Apps脚本预定的触发器每隔几分钟保存到Google Drive,并使用Drive API访问文件),但是由于您说过似乎不想导出到Excel,因此可以尝试执行以下操作:

Saving/exporting to an Excel can also be automated (save to Google Drive every few mins using Apps Script Scheduled Triggers and access the file using the Drive API) but since you said you don't seem to want to export to Excel, you could try doing the following:

  1. 从VBA中访问具有范围的Google Sheets API获取值"端点从需要数据的地方( https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get )[查看此线程:JSON VBA解析为Excel ].

这篇关于将数据从Google表格复制到Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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