Encrypt and Decrypt Excel files

Using MS Excel

In MS Excel (e.g., MS Excel 2003), to implement file‑encryption settings, you may try:

  • From the Tools menu, select Options, and then select the Security tab.
  • Input Password to open and click the Advanced button.
  • Choose the encryption type and confirm the password.

todo:image_alt_text

Figure: Options dialog

todo:image_alt_text

Figure: Encryption Type dialog

Encrypting Excel file

The following example shows how you can encrypt/password‑protect an Excel file using the Aspose.Cells API.

Sample Code:

Decrypting Excel file with Aspose.Cells

It is very easy to open a password‑protected Excel file and decrypt it using the Aspose.Cells API, as shown in the following code: