How can I rename sheet in a different spreadsheet?

时间:2015-07-08 15:59:48

标签: google-apps-script google-sheets

I have copied multiple sheets from one spreadsheet to another using the copyTo(spreadsheet) method. As the documentation suggests,

The copied sheet will be named "Copy of [original name]".

How can I rename that sheet, which is now effectively located in a different spreadsheet than the one hosting my script?

1 个答案:

答案 0 :(得分:1)

我知道在制作副本时可以使用Spreadsheet完成此操作,但我不相信只需一份工作表(只需一次通话)即可。

我认为您需要通过'副本来获取它。姓名并使用setName