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.
Unfortunately, activation email could not send to your email. Please try again.

Deleting and adding tabs

Thread ID:





69555 Nov 1,2007 09:47 AM Nov 5,2007 03:06 PM ASP.NET Web Forms (Classic) 1
Tags: XlsIO
Craig Bart
Asked On November 1, 2007 09:47 AM

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.

Nandakumar R [Syncfusion]
Replied On November 5, 2007 03:06 PM


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?

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



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.