SSS
Contents
[
Hide
]
Şifreleme ve şifre çözme artık Aspose.Cells for C++ için desteklenmiyor
Artık şifreleme ve şifre çözme Aspose.Cells for C++ için desteklenmiyor, bu nedenle bir dosyayı parola ile açmak isterseniz kod istisna atacaktır.
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
#include "Aspose.Cells.h" | |
int main(void) | |
{ | |
try | |
{ | |
// Create a License object | |
intrusive_ptr<License> license = new License(); | |
// Set the license of Aspose.Cells to avoid the evaluation limitations | |
license->SetLicense(new String("Aspose.Cells.lic")); | |
// Create a LoadOption | |
intrusive_ptr<Aspose::Cells::ILoadOptions> loadOpt = Factory::CreateILoadOptions(LoadFormat::LoadFormat_Xlsx); | |
// Set the password with 123 for LoadOption | |
loadOpt->SetPassword(new String("123")); | |
// Open your encrypted file will throw exception | |
intrusive_ptr<Aspose::Cells::IWorkbook> wb = Factory::CreateIWorkbook(sourcePath->StringAppend(new String("Bookpassword.xlsx")), loadOpt); | |
} | |
catch (Exception& ex) | |
{ | |
Console::WriteLine(ex.GetMessageExp()); | |
} | |
} |