Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
809 views
in Technique[技术] by (71.8m points)

How to change a file name of a google form bu Apps script

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");

However this does not work!

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

How about this method?

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

This method can also rename Spreadsheet.

Reference :


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...