よくある質問
Contents
[
Hide
]
現在、Aspose.Cells for C++ の暗号化と復号化はサポートされていません
現在、暗号化と復号化は Aspose.Cells for C++ に対してサポートされていないため、パスワードを使用してファイルを開く場合、コードは例外をスローします。
This file contains hidden or 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()); | |
} | |
} |