FAQ
Contents
[
Hide
]
Verschlüsselung und Entschlüsselung werden für Aspose.Cells for C++ jetzt nicht unterstützt
Jetzt werden Verschlüsselung und Entschlüsselung für Aspose.Cells for C++ nicht unterstützt. Wenn Sie also eine Datei mit Kennwort öffnen möchten, löst der Code eine Ausnahme aus.
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()); | |
} | |
} |