Questions tagged [spreadsheet-protection]

Use for questions about programmatically interacting with inbuilt protections in any spreadsheet. Use with appropriate spreadsheet software tag like [excel], [google-sheets], [libreoffice-calc], [openoffice-calc] and the language tag like [python], [google-apps-script]. Do NOT use for non-programmatic usage.

Protection is a inbuilt feature in most spreadsheet software, where some parts of the spreadsheet like sheet or range can be protected from unwanted edits from users.

Feature Reference:

54 questions
1
vote
1 answer

Use of the protection object in VBA

Is there any way to store the .protection object in VBA and use it to protect the sheet again with the parameters stored in the object? I know it is possible to store the object but I can't use it to protect the sheet again. I need this because…
ApieVuist
  • 13
  • 2
1
vote
2 answers

Pass the Protection Status of Excel Worksheet to a Cell

I'm curious as to whether it's possible to pass the protection status of an excel worksheet to a cell of that worksheet. e.g. Sheet1 is locked for editing...cell A1 would be programmed to say "locked" Sheet1 is unlocked...cell A1 would say…
JohnM
  • 37
  • 1
  • 2
  • 9
1
vote
2 answers

Excel File Password Protection with Open XML SDK

I am using Open XML SDK for creating excel files. I want to protect them with a password. Do you know anyway to protect excel file with a password by using Open XML SDK? I know "com" object way to protect them however, it is not suitable for my…
Birol Capa
  • 349
  • 2
  • 6
  • 18
0
votes
1 answer

Design problem: Editing and triggering onEdit without editing permissions

I would like to know how one should approach the problem of creating a sheet with the following requirements: Let's say User A has access to Sheet1 and Sheet2 but not to Sheet3 (a helper sheet) which is protected and only accessible by admins.…
dan
  • 347
  • 2
  • 14
0
votes
1 answer

Apps Script for Google sheet protection and giving permission to edit for multiple users

I need help for a code to protect Google sheet and giving editing access to multiple users the ability to edit the protected sheet. I have tried the code below but I was able to allow myself to edit but I was not able to add in other email addresses…
0
votes
1 answer

Protection formula looping in appscript

I have the data of 300*8 cell in that 3rd row contains email on based of that i m protecting row by appscript. I m new to appscript and no background of coding or computer. I have made the formula and normally running in individual row No but if I…
0
votes
2 answers

Is there a way using sheet protection to allow a user to enter values but protect formats?

I have a worksheet containing a column of numbers. The column is formatted with a background color, number formats, etc. The column is unlocked. I protect the sheet manually by right-clicking on the tab and selecting Protect. In the Protect Sheet…
jisner
  • 13
  • 3
0
votes
1 answer

How to remain the same permission of protected ranges in a new duplicated google sheet created by using google apps script?

I have a script which I used to duplicate a source sheet. For the source sheet, I protected some of the ranges and only allow Student A and Student B to edit those protected ranges, the rest of the editors in the source sheet are not allowed to do…
weizer
  • 1,009
  • 3
  • 16
  • 39
0
votes
1 answer

Excel VBA - prevent excel from open the file if macro doesn't enabled

I'm working on an excel file, and i did a workbook_open event that show a input box to make the user enter a specific password (because each password open certain part of the file) but i have a problem that if the user doesn't enabled macro, he can…
0
votes
1 answer

Copy Sheet with protections and change new Duplicate's name to a date

I have a template sheet for group data entry. Most of the sheet is free entry, but there are title rows that I don't want edited so I have them protected. We have one of these tabs for each day of the month and a new Sheet for each month. I want to…
0
votes
1 answer

Google sheets - protect sheet except small range

My concern is simple: I want to protect the whole sheet except 1 cell, which is a drop down menu. I want them to be able to change that value but impede the edition of the rest of the sheet. Basically I need the inverse option of protection. Protect…
0
votes
1 answer

159/5000 How to protect a sheet in excel if the data from another sheet is copied automatically?

I'm interested in how to protect a sheet in excel if the data from another sheet is copied automatically and there is a button that should work with the protected copy data? My my data copy code looks like: Sub CopyRow1() ActiveSheet.Unprotect…
0
votes
1 answer

How to check on google sheet/ranges protection status?

I made a code with @OMila aid to restrict some ranges for certain users while protecting the whole remaining ranges in sheet from their editing.. I want to check on the protection status of a sheet/range per for loop iteration, if it is protected…
0
votes
1 answer

How to protect ranges per specific users in google sheet?

I am trying to apply protection on all sheets and certain ranges using a google script, for every sheet in its workbook (and can be applied on new added sheets via a trigger later) the problem is, I want to assign different ranges to different users…
0
votes
1 answer

Is there a way to remove protection in google script for a user?

I need to remove protection for a user that has access to certain cells but needs all the rows and columns when the script is running. After that i then need to protect the sheet again apart from the editable cells. // Unprotect cells F:AP in…