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.

Workbook protection

Thread ID:

Created:

Updated:

Platform:

Replies:

73831 May 21,2008 12:35 PM May 28,2008 04:45 AM Windows Forms 1
loading
Tags: XlsIO
Iliya Nesterov
Asked On May 21, 2008 12:35 PM

Hi!

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

Thanks!


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

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:

[C#]
//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
workbook.Unprotect("syncfusion");



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

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

Please let em know if you have any other concerns.

Regards,
G.Yavana



CONFIRMATION

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.

;