ضبط نوع التشفير القوي

تطبيق التشفير مع مايكروسوفت إكسل

لتنفيذ تشفير الملف في مايكروسوفت إكسل (مثلاً 2007):

١. من قائمة الأدوات, حدد خيارات. ١. حدد علامة التبويب الأمان. ١. أدخل قيمة لحقل كلمة المرور للفتح.

  1. انقر على متقدم. ١. اختر نوع التشفير وقم بتأكيد كلمة المرور.

    إعداد التشفير في مايكروسوفت إكسل

todo:image_alt_text

تطبيق التشفير مع Aspose.Cells

المثال التالي يطبق تشفيرًا قويًا على ملف ويضبط كلمة مرور.

// 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");