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
vb.net
vb.net
Public Property EncryptPassword() As String
Remarks

To further protect your spreadsheet, you can protect the workbook structure using the Workbook.Protect() method or write-protect individual worksheets using the Worksheet.Protect() method.

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 Block
vb.net
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"