我认为这个错误意味着
"destinationSpreadsheetId": "1d8CeUxukBIOUpADE6eBlaksS2ptBjI0vIRpVm8ufEbs"
是错误的。当它看到
the document of spreadsheets.sheets.copyTo
{"destinationSpreadsheetId": ""}
. 因此,请尝试以下修改。
copy_sheet_to_another_spreadsheet_request_body = {
{
"destinationSpreadsheetId": "1d8CeUxukBIOUpADE6eBlaksS2ptBjI0vIRpVm8ufEbs"
}
}
收件人:
copy_sheet_to_another_spreadsheet_request_body = {
"destinationSpreadsheetId": "1d8CeUxukBIOUpADE6eBlaksS2ptBjI0vIRpVm8ufEbs"
}
如果我误解了你的问题,对不起。
编辑:
-
当然,当使用此脚本的用户是您要复制的电子表格的所有者时,脚本工作正常。
-
不是
要复制的电子表格的所有者,
-
如果电子表格未共享,则错误
"The caller does not have permission"
发生。此错误可能与您的情况相同。
-
如果电子表格共享为
On - Anyone with the link
根据以上结果,您能否确认要再次复制的电子表格的权限?