Sub topic 3
Ownership and Transferring It
This chapter assumes you can share a Google Sheet with specific people, and that you know the Viewer, Commenter, and Editor roles. You need a Google account. The Apps Script section assumes basic JavaScript.
Ownership and transferring it
The owner is the account that controls a file. Only the owner can transfer it or delete it permanently. To transfer ownership, open Share, click the person's email in the list, choose "Make owner," and confirm. The file then counts against the new owner's storage. The previous owner becomes an Editor.
Sharing a copy instead of the original
Replace /edit at the end of the sheet URL with /copy. Anyone who opens that link is prompted to make their own copy. Your original stays unchanged.
Publishing to the web is not the same as sharing
File > Share > Publish to web makes a sheet visible to anyone on the internet. There are no roles, no sign-in, and search engines can index the page. Use sharing for controlled access, and use publishing only for content meant for everyone.
Shared drives and inherited permissions
Files in a shared drive belong to the drive, not to one person. Members get access through their role on the drive, and that access applies to every file inside. Removing access from one file does not remove access granted at the drive level, so check drive membership when access looks wrong.
When your organization limits sharing
Google Workspace administrators can block sharing outside the organization, turn off downloading, printing, and copying for viewers, or prevent link sharing. If an option is missing or greyed out, a policy is probably the cause. Ask your administrator instead of working around it.
Automating sharing and protection with Apps Script
This script adds a viewer and an editor to the active spreadsheet:
function shareWithTeam() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addViewer('[email protected]');
ss.addEditor('[email protected]');
}Ownership transfer is kept in a separate function so you run it on purpose:
function transferOwnership() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const file = DriveApp.getFileById(ss.getId());
file.setOwner('[email protected]');
}Sharing best practices
- Share with named people rather than "Anyone with the link."
- Give Viewer or Commenter access unless the person needs to edit.
- Keep ownership on a shared drive or a team account, not on one person's account.
- Review access regularly and remove people who no longer need it.
Exercise
A colleague who owns an important sheet is leaving the company. What should you do before their account is removed?
Show answer
Ask them to transfer ownership to a team account or a shared drive. Files owned by a deleted account can be transferred or deleted, so ownership must move first.