Festlegen des starken Verschlüsselungstyps

Verschlüsselung mit Microsoft Excel anwenden

Um die Dateiverschlüsselung in Microsoft Excel (zum Beispiel 2007) zu implementieren:

  1. Wählen Sie im Extras-Menü die Option Optionen aus.

  2. Wählen Sie den Tab Sicherheit aus.

  3. Geben Sie einen Wert für das Feld Kennwort zum Öffnen ein.

  4. Klicken Sie auf Erweitert.

  5. Wählen Sie den Verschlüsselungstyp aus und bestätigen Sie das Passwort.

    Verschlüsselung in Microsoft Excel festlegen

todo:image_alt_text

Verschlüsselung mit Aspose.Cells anwenden

In dem untenstehenden Codebeispiel wird eine starke Verschlüsselung auf eine Datei angewendet und ein Passwort festgelegt.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
String dataDir = Utils.getDataDir(ApplyingEncryption.class);
// Instantiate a Workbook object.
Workbook workbook = new Workbook(dataDir + "Book1.xls");
// Password protect the file.
workbook.getSettings().setPassword("1234");
// Specify Strong Encryption type (RC4,Microsoft Strong Cryptographic Provider).
workbook.setEncryptionOptions(EncryptionType.STRONG_CRYPTOGRAPHIC_PROVIDER, 128);
// Save the Excel file.
workbook.save(dataDir + "encryptedBook1.xls");