Beispiel #1
0
 public static void EncryptExcelFile(string sourceExcelPath, string destinateExcelPath, string password)
 {
     Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(sourceExcelPath);
     workbook.SetEncryptionOptions(Aspose.Cells.EncryptionType.XOR, 40);
     workbook.SetEncryptionOptions(Aspose.Cells.EncryptionType.StrongCryptographicProvider, 128);
     workbook.Settings.Password = password;
     workbook.Save(destinateExcelPath);
 }