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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Workbook protection

Thread ID:





73831 May 21,2008 04:35 PM UTC May 28,2008 08:45 AM UTC WinForms 1
Tags: XlsIO
Iliya Nesterov
Asked On May 21, 2008 04:35 PM UTC


Is it possible to protect/unprotect an excel workbook (only structure and windows without encryption) by using a password?


Yavanaarasi G [Syncfusion]
Replied On May 28, 2008 08:45 AM UTC

Hi Iliya,

Thank you for your interest in Syncfusion products.

Yes. It is possible to protect an excel workbook by using password.

Here is the code snippet:

//Protect Workbook.
workbook.Protect(true, true, "syncfusion");

//Unprotect workbook.
// Opening a Existing(Protected) Worksheet from a Workbook
IWorkbook workbook = application.Workbooks.Open(@"ProtectedWorkbook.xls");

//Unprotecting( unlocking) Workbook using the Password

Please refer our shipped browser sample that demonstrates the workbook protection:

\\Syncfusion\EssentialStudio\\Windows\XlsIO.Windows\Samples\2.0\Document Settings\SecuritySettings\WorkBookProtection

Please let em know if you have any other concerns.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon