[英]How to automatic combine data from multiple google sheets to another google sheet by GOOGLE APPS SCRIPT
Everyday I have to manually do a report with the data got from multiple google sheets (all have one sheet with the same number of columns) to another google sheet (just have 1 sheet as well).每天我都必须手动使用从多个谷歌工作表(都有一个具有相同列数的工作表)获取的数据到另一个谷歌工作表(也只有 1 个工作表)进行报告。 I loaded all of the google sheets and then copy and paste one by one to the report.我加载了所有的谷歌表格,然后一一复制并粘贴到报告中。 So I would like to ask you how to automatic do this progress by GOOGLE APPS SCRIPT.所以我想问你如何通过GOOGLE APPS SCRIPT自动完成这个进度。 If there are any way to get the data without loading the google sheets is great.如果有任何方法可以在不加载谷歌表格的情况下获取数据,那就太好了。 Ex: I have the link of stage profit such as VIC profit, NSW profit, QLD profit, etc. (I'm in Australia) and I need to report of national profit.例如:我有VIC利润,NSW利润,QLD利润等阶段利润的链接(我在澳大利亚),我需要报告国家利润。 Could you please advise me?你能告诉我吗?
Much appreciate your advice.非常感谢您的建议。
Phuc.福。
You can open another "file" with SpreadsheetApp.openById()
.您可以使用SpreadsheetApp.openById()
打开另一个“文件”。 And from there you can use its sheets, data, everything.从那里你可以使用它的工作表、数据和一切。
https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-app#openbyidid https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-app#openbyidid
var ss_current = SpreadsheetApp.getActiveSpreadsheet();
var ss_remote = SpreadsheetApp.openById("abc1234567");
var values = ss_remote
.getSheetByName("Expenses")
.getRange('A1:C')
.getValues();
and you can insert it here你可以在这里插入
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.