[英]Move Data From one google sheet workbook to another
Move Data from one Google sheet workbook to another. 将数据从一个Google表格工作簿移动到另一个。 How can I make this work improving the code here:- 如何在这里改进代码: -
function moveValuesOnly() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var source = ss.getRange('A5:D');
var destSheet = ss.getUrl('myurl');
var destRange = destSheet.getRange(destSheet.getLastRow()+1,6);
source.copyTo (destRange, {contentsOnly: true});}
Getting this error 得到这个错误
"Cannot find method getUrl(string)" “找不到方法getUrl(string)”
I can find plenty of solutions one sheet to another inside same workbook, but not separate workbooks. 我可以在同一个工作簿中找到大量的解决方案,但不是单独的工作簿。
Don't want importrange
or Query
as moved data, must not be linked. 不希望importrange
或Query
作为移动数据,不得链接。
Maybe what you need is to replace 也许你需要的是更换
ss.getUrl('myurl')
by 通过
SpreadsheetApp.openByUrl('myurl')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.