Forum Discussion
Insert / Delete rows to table with locked cells (no-code solution)
Hello!
I am looking for ideas that do not require code for a task involving locked cells in a table. It has to be no-code so it can run on Excel Online. (I have already implemented it in VBA & Script; Script is way too slow in Excel Online so it cannot be used).
The task:
the user has a table containing 5 columns. 3 of these column have to always be locked so the data cannot be changed. the remaining 2 are unlocked. Each time a new row is added, all the 5 columns are populated with data, but once the row is saved, only the remaining 2 column can be modified.
The code solution:
I have added 2 buttons that add or delete rows from the table while maintaining the existing cells in the table locked or unloked (based on the columns). Both solutions work perfectly in VBA and script.
The new desired solution:
Replicate the solution mentioned above without using any code. The sole reason is that the users access the file directly on the browser (VBA macros do not work on the browser & the script is too slow to load up - ex: it takes 5 minutes to add or remove a row from the table).
I have added "Insert / delete rows to the sheet" command in the ribbon. Unfortunately, when I protect the sheet, the rows cannot be deleted from the table (due to the protection) or the data that is being added is placed in the wrong row.
Any suggestions are welcomed!
Best regards,
Denis
I'm afraid there isn't a no-code solution. I suggest you vote for this idea: https://feedbackportal.microsoft.com/feedback/idea/11edffed-f753-ed11-9561-000d3a1f4367
That being said, perhaps an office-js add-in can be created which allows for this to work?
What does your Office Script look like?
2 Replies
- DnsCopper Contributor
thanks for the reply! after discussing with the user we have decided to drop the idea completely. i attached a picture with the script.
- JKPieterseSilver Contributor
I'm afraid there isn't a no-code solution. I suggest you vote for this idea: https://feedbackportal.microsoft.com/feedback/idea/11edffed-f753-ed11-9561-000d3a1f4367
That being said, perhaps an office-js add-in can be created which allows for this to work?
What does your Office Script look like?