Sub topic 2
Viewer, Commenter and Editor: what each role can do
This chapter assumes you have a Google account, can create and open a Google Sheet, and know the basic interface (menus, tabs, cell ranges). The scripting section near the end uses basic JavaScript, but you can skip it and still follow the rest.
Roles are the unit of access
Every person who can open a spreadsheet has a role on it. The role decides what that person can do, and it is separate from how they found the file. Google Sheets has four roles:
- Viewer can read the spreadsheet.
- Commenter can read it and add comments.
- Editor can read it, change it, and by default manage who else has access.
- Owner has every Editor ability plus control over the file's existence and ownership.
You can give Viewer, Commenter or Editor to a named person or to anyone who has the link. Only one account is the owner at a time. Later chapters cover how to grant roles. This chapter covers what each role allows once granted.
Viewer
A Viewer can open the spreadsheet and look at everything in it. This includes every visible tab, the values in cells, and the formulas behind them. A Viewer cannot type into cells, add or delete sheets, or leave comments.
Some behaviors surprise people:
- A Viewer can sort and filter the data on screen using a temporary filter. This changes only what that person sees. Nobody else's view changes, and the file is not modified.
- A Viewer can usually download the file or make a copy. The owner or an editor can turn this off, as the chapter on advanced sharing options explains.
- A Viewer cannot see data you chose to hide from the sheet's formulas. They can see anything that is in the file, including formulas that reference other tabs.
The last point matters for privacy. Viewer access is access to the whole file. If a tab holds salaries, a Viewer can read it. Hiding a tab does not make it private. To keep data from someone, put it in a different spreadsheet, or share a copy that doesn't contain it.
Commenter
A Commenter has all Viewer abilities and can also add comments to cells and reply to existing comments. A comment is a note attached to a cell or range. It shows up in the comment thread and can send a notification to anyone mentioned with @.
A Commenter still cannot change cell contents. This makes the role a good fit for review: a manager can point at a number and write "This looks low, check the source" without any risk of altering the number.
Keep in mind that commenting needs an identity. Comments are labeled with the author's name, so the person must be signed in to a Google account. If you set link access to Commenter, people who are not signed in cannot comment, and Google asks them to sign in first.
Sheets has no "suggesting" mode like Google Docs. A Commenter cannot propose an edit that you then accept. They can only describe a change in a comment, and you apply it yourself.
Editor
An Editor can change the spreadsheet. That includes:
- typing and deleting values and formulas
- adding, deleting, renaming, hiding and reordering sheets
- changing formatting, data validation, conditional formatting and named ranges
- importing data and connecting other sources
- opening the version history and restoring earlier versions
- opening the bound Apps Script project and running scripts
By default an Editor can also share the file. They can add people, change roles, and change general access. This is the most common source of unplanned exposure. If you give someone Editor access, you have effectively given them the ability to hand the same access to others. The owner can turn this off with the sharing setting "Editors can change permissions and share". Doing so keeps permission changes with the owner. The chapter on controlling editors and viewers walks through that setting.
An Editor does not own the file. They cannot transfer ownership. If the file is in the owner's My Drive, an Editor who "deletes" it only removes it from their own view of Drive. The file stays for everyone else.
Editor is not unlimited either. Protected sheets and ranges can block specific Editors from specific cells. This is why a person with the Editor role may still see a "You are trying to edit a protected cell or object" message. The role says what someone can do in general. A protection says what they can do in one place.
Comparing the roles
| Ability | Viewer | Commenter | Editor | Owner |
|---|---|---|---|---|
| Read all visible sheets and formulas | Yes | Yes | Yes | Yes |
| Use a temporary personal filter | Yes | Yes | Yes | Yes |
| Add and reply to comments | No | Yes | Yes | Yes |
| Change cell contents | No | No | Yes | Yes |
| Add or delete sheets | No | No | Yes | Yes |
| View version history | No | No | Yes | Yes |
| Share the file and change roles | No | No | Yes, unless restricted | Yes |
| Transfer ownership | No | No | No | Yes |
| Delete the file for everyone | No | No | No | Yes |
Download, print and copy are not in the table because the owner and editors can switch them off for Viewers and Commenters. Whether they are available depends on those settings.
How roles combine
One person can match more than one rule. You might share a file with Maria as Editor and also set the link to "Anyone with the link: Viewer". Maria then has two possible routes in, one as a named Editor and one through the link as a Viewer. Google applies the more permissive one, so Maria edits.
This has a practical consequence. Setting a person to Viewer does not lower their access if the link already gives Editor. To reduce someone's access you must lower every route that reaches them. Check the named list and the general access setting together.
The same idea holds for inherited access. A file stored in a shared drive or folder can inherit permissions from it, and a person's effective role is the highest one from any source. A later chapter covers inheritance in detail.
Choosing a role
Start from what the person needs to do, and give the lowest role that allows it.
- If they only need to read, use Viewer.
- If they need to react or review but not change data, use Commenter.
- If they need to enter or fix data, use Editor.
- If the file needs a new accountable owner, transfer ownership instead of adding another Editor.
A common mistake is giving Editor to everyone because it removes friction. That works until someone sorts one column without its neighbors, or pastes over a formula range. Version history can recover the data, but it is easier to avoid the problem. Where a team does need to edit, give them Editor and protect the cells that must not change.
Setting roles with Apps Script
If a script is bound to the spreadsheet, you can grant roles in code. SpreadsheetApp has addViewer and addEditor. It has no addCommenter, so Commenter access goes through the matching file in Drive.
function shareWithPeople() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addViewer('[email protected]');
ss.addEditor('[email protected]');
// Spreadsheet has no addCommenter, so use the Drive file.
const file = DriveApp.getFileById(ss.getId());
file.addCommenter('[email protected]');
}The first time you run it, Google asks you to authorize the script to use Sheets and Drive. Replace the example addresses with real accounts before you run it, because the script sends real sharing invitations.
To check the result, you can list who holds which role:
function listAccess() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
console.log('Owner: ' + ss.getOwner().getEmail());
console.log('Editors: ' + ss.getEditors().map(u => u.getEmail()).join(', '));
console.log('Viewers and commenters: ' + ss.getViewers().map(u => u.getEmail()).join(', '));
}getViewers() returns viewers and commenters together, so this list does not tell the two apart. Use the Share dialog to see each person's exact role.
Common errors
- "I'm a Viewer but I want to change it." Ask the owner or an editor for Editor access, or make your own copy if copying is allowed. Edits to the copy don't change the original.
- "I'm an Editor but I can't change this cell." A protected sheet or range is likely in the way. Ask the owner whether you are on its editor list.
- "I lowered someone to Viewer but they can still edit." Another route, such as link access or a group or folder permission, probably still gives them Editor.
- "Commenters can't comment for people without accounts." Commenting requires sign-in. Anonymous link visitors can only read.
Exercise
You share a budget spreadsheet with Dana as Viewer. The general access setting is "Anyone with the link: Editor". Dana opens the file from the link and edits a cell. Why is this allowed, and what must you change so that Dana can only read?
Show answer
Dana has two routes: the named Viewer role and the link's Editor role. Google applies the more permissive one, so she can edit. To make her read-only, lower the general access role to Viewer (or set general access to Restricted), so that no route gives her more than Viewer.
Exercise
A colleague needs to point out mistakes in a report sheet, but you do not want any data changed. Which role do you give them, and what can't they do with it?
Show answer
Give them Commenter. They can add comments and replies on cells, but they can't change cell contents, add or delete sheets, or view version history. Sheets has no suggesting mode, so they describe changes in comments and you apply them.