加密和解密 Excel 文件

使用 Microsoft Excel

要在 Microsoft Excel 中设置文件加密设置(此处为 Microsoft Excel 2003):

  1. 来自工具菜单,选择选项.将出现一个对话框。
  2. 选择安全标签。
  3. 输入密码并点击先进的
  4. 选择加密类型并确认密码。

用 Aspose.Cells 加密 Excel 文件

以下示例显示如何使用 Aspose.Cells API 加密和密码保护 excel 文件。

用 Aspose.Cells 解密 Excel 文件

打开密码保护的excel文件并使用Aspose.Cells API解密是非常有用的,如下代码: