简体   繁体   English

将数据从一个Google工作表工作簿移动到另一个工作簿

[英]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. 不希望importrangeQuery作为移动数据,不得链接。

Maybe what you need is to replace 也许你需要的是更换

ss.getUrl('myurl')

by 通过

SpreadsheetApp.openByUrl('myurl')

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 for 循环将数据从一个 Google Sheet 映射到另一个 - Use for loop to map data from one Google Sheet to another one 将数据从一张纸复制到另一张 - Google Script - Copy Data from one sheet to another - Google Script Google 工作表脚本将数据集从一张工作表复制到另一张工作表的顶部(仅限值) - Google sheets script copy data sets from one sheet to another (values only) at the top of the sheet Google 工作表应用程序脚本 - 根据循环条件将数据从一张工作表复制到另一张工作表 - Google sheet app script - Copy data from one sheet to another based on condition with loop 如何从一张工作表中获取Google Spreadsheet中的数据行,并预先填充另一张工作表 - How to take rows of data in Google Spreadsheet from one sheet, and pre-populate another sheet Google表格:根据单元格值将一行数据移动到另一张表格 - Google Sheets: Move a row of data to another sheet based on cell value 将范围从一个工作表复制到Google工作表中的另一个工作表 - Copy a range from one sheet to another in google sheet 将数据从一张表传输到另一张表并删除谷歌表中的旧数据 - Transfer Data from one sheet to another and deleting old data in google sheets 使用GAS将数据从工作表中的单元格移动到另一个工作表 - Move data from cells in worksheet to another sheet using GAS 从 Google 表单响应表中自动移动昨天的数据 - Auto Move Yesterday's Data from Google Form Response Sheet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM