Sub topic 14
Sharing best practices
This chapter pulls the earlier material into working habits. It assumes you already know the three roles (Viewer, Commenter, Editor), the difference between Restricted and Anyone with the link general access, and how protected ranges work. It also assumes you have used the Share dialog and can read a short JavaScript function. The goal is a repeatable way to decide who gets what, and how to keep that decision correct over time.
Start from the least access that works
Every sharing decision is a choice between convenience and exposure. The practical rule is to grant the lowest role that lets the person do their job, and to widen access only when someone asks.
- Give Viewer to people who only read results.
- Give Commenter to reviewers who should flag problems but not change data.
- Give Editor only to people who maintain the data or formulas.
A common mistake is giving Editor "to be safe" because it avoids follow-up requests. An Editor can delete rows, overwrite formulas, and (unless you restrict it) share the file with others. Fixing that costs far more than answering one extra access request.
| Situation | Suggested setup |
|---|---|
| Monthly report for management | Named people as Viewer, general access Restricted |
| Draft that needs feedback | Reviewers as Commenter |
| Shared team tracker | Team as Editor, formula sheets protected |
| Template for many people | Share the `/copy` link so each person gets their own file |
| Public data you want anyone to read | Publish to the web or Anyone with the link as Viewer, after checking the data |
Prefer named people and groups over links
Restricted access with named people gives you an audit trail. You can see exactly who has access, and each person must sign in. Link sharing is faster, but anyone who obtains the link has the link's role, and you cannot tell who that is.
Use Anyone with the link only when all of these hold:
- The content is safe to be read by someone you never intended.
- The role is Viewer, or Commenter at most.
- You accept that the link can be forwarded.
When your organization uses Google Groups, share with a group address instead of a list of individuals. Membership changes then happen in one place, and you do not have to edit the sheet's permissions when someone joins or leaves a team.
Lock down what editors and viewers can do
Roles control what people can do to the content. Two settings in the Share dialog's advanced options control what they can do to the permissions and the data copy:
- Clear "Editors can change permissions and share" so only the owner manages access. Without this, any editor can add people you never approved.
- Clear "Viewers and commenters can see the option to download, print, and copy" when the data is sensitive. This is a deterrent, not a guarantee. Anyone who can see the data can still take a screenshot or retype it.
Separate data people may see from data they may edit
Protection works at the sheet and range level, so design the workbook with that in mind.
- Keep raw data, calculations, and presentation on separate sheets.
- Protect the calculation sheet and any cells holding formulas, and leave input ranges unprotected.
- Use a description on every protection, such as "Totals - owner only", so the next maintainer understands why it exists.
- Remember that protection only restrains people who have Editor access. Viewers cannot edit anything anyway.
Hiding a sheet is not protection. Editors can unhide it, and viewers can often reach its contents through formulas, exports, or copies.
If viewers need only some of the data, the safest pattern is a second spreadsheet that holds the summary. Share that one widely and keep the source restricted. A formula such as IMPORTRANGE can feed the summary file, but check who has access to the destination, because the connection grants access to whoever can open it only after the owner of the source allows it.
Share a copy when people should not touch the original
If you distribute a template or a form to fill in, do not give recipients access to the original. Replace the trailing /edit with /copy in the URL:
Original link: https://docs.google.com/spreadsheets/d/FILE_ID/edit
Copy link: https://docs.google.com/spreadsheets/d/FILE_ID/copyEach person who opens the copy link is prompted to create their own file, which they own. Their changes never reach your original. They still need at least view access to the original, so set general access or named access to Viewer first.
Choose the owner and location on purpose
The owner controls the file's lifecycle. If the owner leaves the organization and their account is deleted, files they own can be lost or need recovery by an administrator.
- For work that outlives one person, put the file in a shared drive, where the organization owns it rather than an individual.
- When a file must stay in My Drive, transfer ownership to a stable account, such as a team lead, before the original owner moves on.
- Remember that files in a shared drive inherit the drive's membership. Adding someone to the drive gives them access to every file in it, so keep drives narrow in purpose.
Review access on a schedule
Permissions drift. People change roles, projects end, and links that were temporary stay live. Build a short review into your routine.
- Open Share and read the list of people with access. Remove anyone who no longer needs it.
- Check general access. If it is Anyone with the link, ask whether that is still needed.
- Check the advanced options for editors and viewers.
- Check which sheets and ranges are protected, using Data, then Protected sheets and ranges.
- Look at the version history if you suspect an unwanted change, and restore a previous version if needed.
For sensitive files, do this every quarter or whenever a project closes. For temporary access, set an expiration date when you add the person if your edition of Google Workspace supports it.
Use Apps Script for consistency, with care
When you set up many sheets the same way, a script removes manual error. The following function applies a standard policy: named people at fixed roles, and a link that allows viewing only. Commenter access goes through the Drive file, because Spreadsheet has no addCommenter method.
function applyStandardSharing() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const file = DriveApp.getFileById(ss.getId());
ss.addViewer('[email protected]');
ss.addEditor('[email protected]');
file.addCommenter('[email protected]');
file.setSharing(DriveApp.Access.ANYONE_WITH_LINK, DriveApp.Permission.VIEW);
}Scripts carry their own risks:
- A script runs with the authority of the person who authorizes it. Review the permission prompt before approving.
- Calling
setSharingoverrides what an administrator or another editor chose by hand. Log what you change. - Organization policies can block the call, and the script then throws an error. Handle it rather than assuming success.
function safeShare(email) {
try {
const ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addViewer(email);
console.log('Added viewer: ' + email);
} catch (e) {
console.error('Could not share with ' + email + ': ' + e.message);
}
}Decision flow for a new share
The diagram summarizes the questions to ask before sharing, in order.
Common mistakes
| Mistake | Why it hurts | Fix |
|---|---|---|
| Link set to Editor | Anyone with the link can change or delete data | Use Viewer, or name the editors |
| Hiding a tab to keep data private | Editors can unhide it, and others may copy it | Move the data to a separate file |
| Sharing with a personal email by habit | Access stays after the person leaves your team | Use work accounts or groups |
| Forgetting editors can reshare | Access spreads beyond your list | Clear the permission-change option |
| Leaving old links live | Past collaborators keep access | Review and set general access to Restricted |
Exercise
A finance analyst owns a workbook with a Salary sheet, a Calculations sheet with formulas, and a Summary sheet. Twelve managers need to read the Summary, two colleagues must update inputs on a Data sheet, and the analyst is leaving the company next quarter. Describe a sharing setup that follows the practices in this chapter.
Show answer
Move the Summary into its own spreadsheet (fed by IMPORTRANGE if needed) and share that with the managers' group as Viewer, with general access Restricted and download, print and copy disabled if appropriate. Keep the Salary data in a separate restricted file so it is not exposed through the workbook. In the working file, give the two colleagues Editor access, protect the Calculations sheet and formula cells so only the owner can edit them, and clear "Editors can change permissions and share". Before the analyst leaves, move the files to a shared drive or transfer ownership to a stable account, then do an access review to remove people who no longer need access.
Exercise
You want 200 trainees to each get a personal working version of a template without any risk to the original. What do you share, and what role must they have on the original?
Show answer
Share the link with /edit replaced by /copy. Each trainee must be able to view the original, so give them Viewer access (by name, group, or a Viewer link). Opening the copy link prompts them to make their own copy, which they own.