How to make google sheet file name appear in cell

55 views
Skip to first unread message

Bob Richardson

unread,
Mar 2, 2022, 10:06:51 PM3/2/22
to Google Sheets Community
I need the filename of my google sheet to appear in a cell because the phone app doesn't show the filename which is causing confusion for our users.  I know I can use scripts but the problem is the people using the spreadsheet "make a copy" of the sheet for their own use but then the script won't work without them giving it permission to run (which is a hassle because they are not tech savvy and there are a lot of them).

I need a formula to show the filename instead of a script.

Thank you for your help!

Alexander Ivanov

unread,
Mar 3, 2022, 12:29:04 AM3/3/22
to Google Sheets Community
Hi!

OK. You have to add the javascript comment

/**
 *  @customfunction
 */
function ACTIVEBOOK(command) {
  return SpreadsheetApp.getActive()[command]();
}


1646284712656.png


Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages