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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Workbook protection

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 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:

[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.

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

;