Deleting and adding tabs

Is there a way to prevent users from deleting and adding new worksheets to a workbook. I have a file that is generated using asp.net. This file has 3 tabs all of which are needed on upload. I have had problems with users removing tabs which cause there template to fail on upload. Thanks.


1 Reply

NR Nandakumar R Syncfusion Team November 5, 2007 08:06 PM UTC


Hi,

The Protect() method can be used to disable creating and deleting worksheets to a workbook.

Can you try the below code and let me know if this helps?


[C#]
//Protect the Workbook from inserting and deleting the Worksheets.
workbook.Protect(false, true);


Regards,
Nanda

Loader.
Up arrow icon