[英]Importing data from one spreadsheet to another without the import range function
I am trying to build this database and have the database connect to a different spreadsheet. 我正在尝试构建此数据库,并使数据库连接到其他电子表格。 I am trying to import the id's of different client from the database spreadsheet into another spreadsheet.
我正在尝试将不同客户端的ID从数据库电子表格导入另一个电子表格。
But I keep on getting this error message: 但是我继续收到此错误消息:
Bad value (line 6, file "Code")Dismiss
line 6 is: 第6行是:
var targetSpreadsheet = SpreadsheetApp.openById("Control Panel");
function logMemberId () {
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Database");
var targetSpreadsheet = SpreadsheetApp.openById("Control Panel");
var rangeOfNumbers = ss.getRange("A2:A100").getValues();
targetSpreadsheet.getRange("B3").setValues(rangeOfNumbers); }
var targetSpreadsheet = SpreadsheetApp.openById("xxxx");
xxxx needs to be the ID that you find in the URL of the document. xxxx必须是您在文档URL中找到的ID。 For example, in this document
例如,在本文档中
it is "1kvrEKMXLLq4mQ-Uhlc6tOJnh5cReiRIcD94fJKSNlIw"
它是“ 1kvrEKMXLLq4mQ-Uhlc6tOJnh5cReiRIcD94fJKSNlIw”
"Control Panel" is likely the title of your document and not the ID. “控制面板”可能是文档的标题,而不是ID。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.