When it comes to securing files and accounts, adding a password is often the first idea that comes to mind. While Google Sheets doesn’t have this feature by default, it is possible to achieve it using Google Apps Script. Learn how to do it in this tutorial.
Is it Possible to Protect Google Sheets Files with a Password?
At first glance, it may seem impossible to password-protect a Google Sheets spreadsheet. That’s because Google Sheets doesn’t have a built-in password feature. Instead, it has a sharing function that allows you to control which Google accounts have access to the data.
However, as we’ve seen in other tutorials, you can add additional features to Google Sheets using Google Apps Script. That’s what we’ll be using in this tutorial.
Why Provide an Extra Layer of Protection?
Some sheets may contain sensitive data such as login information, banking details, income, and more. If the account used is shared, adding this kind of functionality to the Google Sheets spreadsheet will ensure that even if the account is compromised, there is an additional layer of protection preventing access to the data.
How to Protect Google Sheets Files with a Password
Step 1: Open the Google Sheets Template
Click on the link below to open the template:
Step 2: Copy the Template to Your Google Sheets
The link will prompt you to make a copy of the sheet with its files and Google Apps Script functionalities. Click on “Make a copy”.
Step 3: Open Google Sheets Apps Script
To open Google Apps Script, click on “Extensions” in the main toolbar, then select “Apps Script”.
Step 4: Start a New Deployment
Click on the arrow next to the “Deploy” button, then select “New deployment”.
Step 5: Deploy the Script
A box will appear allowing you to configure the deployment. You can choose not to modify these settings. Click on “Deploy”.
Step 6: Authorize Access to Apps Script
As you run the script for the first time, Google Apps Script will ask for authorization to access the script. Click on “Authorize access”.
A new window will appear, prompting you to select the Google account to authorize. Select your account.
A page will load, informing you that the application hasn’t been verified by Google. However, this application is safe.
Click on “Advanced”, then on “Access ProtectedSheet”.
You will be redirected to the page containing the list of permissions required to run the application. Click on “Allow”.
Step 7: Click on “Done”
The window will close, and you will be taken back to the “New deployment” box. Click on “Done”.
Step 8: Click on “Protect File”, then on “Initialize”
A small box titled “Script Finished” indicates that the script has been initialized. We are now ready to add content to this sheet and encrypt it.
You can now start adding data to the spreadsheet. It’s best to store the data starting from row 3. You’ll understand why in the next section.
Set a Password to Encrypt the Data
When you encrypt the data for the first time, you will be prompted to provide a password. Here are the steps:
Step 1: Click on “Protect File”
Step 2: Select “Encrypt File”
Step 3: Set a New Password
Step 4: Click on “OK”
The data will be encrypted starting from row 3.
The same steps apply if you want to encrypt data again.
How to Unlock/Decrypt the Data
Here are the steps to decrypt the data:
Step 1: Click on “Protect File”
Step 2: Select “Decrypt File”
Step 3: Enter the Password
Step 4: Click on “Enter”
You will see the decrypted data in action.
How to Change the Password
This process may be necessary, especially if there are changes in people who have access to the accounts. Here are the steps to replace the old password with a new one.
Step 1: Click on “Protect File”
Step 2: Select “Change Password”
Step 3: Replace the Old Password with a New One
Step 4: Click on “Submit”
Follow the steps to encrypt the data in the previous sections to activate the new settings.
Now that you know how to protect your Google Sheets files with a password, you can keep your sensitive data secure. If you want to learn more about Google Sheets and other marketing tips, check out Crawlan.com.