如何更改Google Form bu Apps脚本的文件名 [英] How to change a file name of a google form bu Apps script

查看:94
本文介绍了如何更改Google Form bu Apps脚本的文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于 google电子表格,可以使用以下脚本轻松更改文件名:

For a google spreadsheet it is easy to change the filename by using this script:

var file = SpreadsheetApp.openById(Idfile);
file.rename("new name");

更改表单的文件名对我来说很合乎逻辑

Logical to me for change file name of a form:

var form = FormApp.openById(Idform);
form.rename("new name");

但是这不起作用!

谁知道使用应用脚本更改 google表单的文件名的解决方案?

Who knows the solution to change a filename of a google form by using apps script?

推荐答案

这种方法怎么样?

DriveApp.getFileById(id).setName("new name");

此方法还可以重命名电子表格.

This method can also rename Spreadsheet.

这篇关于如何更改Google Form bu Apps脚本的文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆