Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

Sets or returns the password used to encrypt the spreadsheet. Standard "Office 97/2000 Compatible" encryption is used to encrypt the spreadsheet. This is the default encryption used by Excel 97 and later versions.

Signature
C#
C#
 public System.String EncryptPassword{ get; set; }
{signature}{signature:
}
Signature
vb.net
vb.net
Public Property EncryptPassword() As String
{signature}
{remarks}
To further protect your spreadsheet, you can protect the workbook structure using the [
Remarks

To further protect your spreadsheet, you can protect the workbook structure using the Workbook.Protect()

|Workbook.Protect(String)]

method

or

write-protect

individual

worksheets

using

the

[

Worksheet.Protect()

|Worksheet.Protect(String)]

method.

{remarks} {example}{code:csharp|title=C#}

Example
Code Block
csharp
csharp
titleC#


          //--- Get the EncryptPassword value for the workbook
          string pwd = wb.EncryptPassword;

          //--- Set the EncryptPassword value for the workbook
          wb.EncryptPassword = "MyPassword";
        
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}


          '--- Get the EncryptPassword value for the workbook
          Dim pwd As String = wb.EncryptPassword

          '--- Set the EncryptPassword value for the workbook
          wb.EncryptPassword = "MyPassword"
        
{code} {example}