Hi,
I’m using the latest Cells for C++.
Where can I find how to open and save xlsx with password?
Thanks.
@kngstr,
You can work with Aspose::Cells::ILoadOptions to open XLSX with password:
intrusive_ptr<Aspose::Cells::ILoadOptions> loadOpt = Factory::CreateILoadOptions(LoadFormat::LoadFormat_Xlsx);
loadOpt->SetPassword(new String("123"));
intrusive_ptr<Aspose::Cells::IWorkbook> wb = Factory::CreateIWorkbook(new String("Book1.xlsx"), loadOpt);
For saving with password, you can use Protect() method of API.
This file can not be loaded with the correct password(123456).
encrypt.123456.zip (20.4 KB)
screenshot (150.4 KB)
@kngstr,
We have observed this issue here and logged it in our database for further investigation. You will be notified here once any update is ready to share.
This issue is logged as:
CELLSCPP-256 - Password protected file cannot be loaded
@kngstr,
We have analyzed the requirement and am afraid to share that in Aspose.Cells for CPP we don’t support encryption and decryption for the files. We are sorry for the inconvenience caused to you.
Bad news.
Will this be supported in the future?
Since my license expired today.
Thanks.
Yes, the ticket is still Open, so we might support in future versions. Once we support the feature, we will update in this thread.
@kngstr,
We have further discussed this issue and afraid to share that Aspose.Cells.C++ does not support opening password-protected files. We have a plan to support it in the future but we cannot provide any ETA right now. We will update you here if it is implemented and ready for sharing.
This is to inform you that the issue (logged earlier as “CELLSCPP-256”) has been resolved. The fix will be included in our upcoming release (Aspose.Cells for C++ v23.12) that we plan to release in the next month (December). You will be notified when the new version is published.