ODS dosyalarını şifrele ve şifresini çöz
Contents
[
Hide
]
OpenOffice.org, parola korumayı ve dosyaları şifrelemeyi destekleyen tam özellikli bir ofis paketidir. Ancak şifreli ODS dosyası, şifre girildikten sonra yalnızca OpenOffice tarafından açılabilir. Excel, şifrelenmiş ODS dosyasını açamaz ve uyarı mesajı verebilir. Şifreleme seçenekleri, diğer dosya türlerinden farklı olarak ODS dosyası için geçerli değildir.
Aspose.Cells, ODS dosyasını şifrelemeye ve şifresini çözmeye izin verir. Şifresi çözülmüş ODS dosyası hem Excel’de hem de OpenOffice’te açılabilir,
OpenOffice Calc ile şifreleyin
- SeçmeFarklı kaydet ve tıklayınŞifre ile Kaydet Kutu.
- TıklaKayıt etmek buton.
- İstediğiniz şifreyi her ikisine de yazın.Açmak için Parolayı Girin veŞifreyi Onayla açılan Parola Belirle penceresindeki alanlar.
- TıklaTamam dosyayı kaydetmek için düğmesine basın.
.Net için ODS dosyasını Aspose.Cells ile şifreleyin
ODS dosyasını şifrelemek için dosyayı yükleyin veWorkbookSettings.Password kaydetmeden önce gerçek parolaya değer. Çıkış şifreli ODS dosyası yalnızca OpenOffice’te açılabilir.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string sourceDir = RunExamples.Get_SourceDirectory(); | |
//Output directory | |
string outputDir = RunExamples.Get_OutputDirectory(); | |
// Open an ODS file | |
Workbook workbook = new Workbook(sourceDir + "sampleODSFile.ods"); | |
// Password protect the file | |
workbook.Settings.Password = "1234"; | |
// Save the ODS file | |
workbook.Save(outputDir + "outputEncryptedODSFile.ods"); |
.Net için ODS dosyasının şifresini Aspose.Cells ile çözün
ODS dosyasının şifresini çözmek için, dosyayı bir parola girerek yükleyin.LoadOptions.Şifre . Dosya yüklendikten sonra,WorkbookSettings.Password null için dize.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string sourceDir = RunExamples.Get_SourceDirectory(); | |
//Output directory | |
string outputDir = RunExamples.Get_OutputDirectory(); | |
// Open an encrypted ODS file | |
Aspose.Cells.LoadOptions loadOptions = new Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.Ods); | |
// Set original password | |
loadOptions.Password = "1234"; | |
// Load the encrypted ODS file with the appropriate load options | |
Workbook workbook = new Workbook(sourceDir + "sampleEncryptedODSFile.ods", loadOptions); | |
// Set the password to null | |
workbook.Settings.Password = null; | |
// Save the decrypted ODS file | |
workbook.Save(outputDir + "outputDecryptedODSFile.ods"); |