We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

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.
Live Chat Icon For mobile
Up arrow icon