We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Open and save xlsx with password

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.

@ahsaniqbalsidiqui

Thanks. I’ll try it.

@ahsaniqbalsidiqui

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.

@ahsaniqbalsidiqui

Bad news.
Will this be supported in the future?
Since my license expired today.

Thanks.

@kngstr,

Yes, the ticket is still Open, so we might support in future versions. Once we support the feature, we will update in this thread.

@Amjad_Sahi

OK. Thanks.

@Amjad_Sahi

Cells for C++ has no release version for monthes.
Any news? Thanks.

@kngstr,
We are gathering information about next release and will share here once available.

@kngstr,

We hope that the feature would be included into the version(s) included in Q2-Q3 of 2021.

@Amjad_Sahi

Thanks.

@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.

@ahsaniqbalsidiqui

OK. Thanks.