Hi OS community,
i want to disable excel column when i download that excel from my dashboard. Also i want to disable header row so no one can change that header. I also want to enable few columns in that excel so that user can update the value manually and upload again.
Hi Devanshu
If you look at the sample application, Sample04 specifically, you'll see how to protect the worksheet (with or without password) but also how to allow certain cells to still receive user input.
When setting the protection options for the worksheet, be sure to set AllowSelectUnlockedCells to True.
When setting the worksheet protection, the whole sheet will be protected, so you need to specify the cells/columns/rows that you don't want protected using the CellFormat_ApplyToRange action.
Let's say we want to set the entire column C and row 7 as editable, then we use Address_From_Text action with"C:C:" as input to get the range for column C and we use Address_From_Text with parameter "7:7" to get the range for row 7. The Address_From_Text action will return the entire range as row +col values that we can use in the next action CellFormat_ApplyToRange to set the cells as Unlocked.
I've attached an updated version of the Demo app that will show you (Sample04) how to do that.
Hope this helps.
Hanno
Thankyou @Hanno for your solution it works for me actually last night i achieve exactly what i want i find one of your old solution and implement it and it works for me.
Post Link
Thanks
Hi @Hanno
I have tried this and its work but just facing one issue while opening excel in ms office right click on sheetname and just clicked on unprotect sheet its unlock all the column i want to restrict this like when someone try to unprotect its asked for password i have tried to put password in worksheet_protect function but its not working any suggestions how to handle this.
Rizwan
Hi Mohammed
I'll have a look as soon as I can.
Do you perhaps have an .oml you can share in the meantime? If not, that is okay.
Hi Devanshu,By default all cells of Excel are protected you just need to enable the "protect" property of the worksheet, this is what I got from Google.I have not checked this in OS but you might get your solution by using the below selected features.Please let me know if you have any queries.Regards,
Hi,
This workbook_Protect / worksheet_protect - set protection on the workbook/worksheet level (By Password)