Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Dec 15, 2021 2:57 pm

Hi,

could you please consider adding a new overload of Workbook.IsPasswordProtected(Stream stream)?
Alternatively, it would also be great if there would be an appropriate error message when opening a password-protected sheet with the wrong password (or not password at all).

KR,
Gerhard

GerhardFinee
 
Posts: 26
Joined: Thu Nov 07, 2019 7:57 am

Thu Dec 16, 2021 3:03 am

Hello,

Thanks for your inquiry.
We will add an overload to accept a stream in IsPasswordProtected method. Once it is achieved in the future, we will let you know.
In addition, when Spire.XLS loads a password-protected Excel file, if the password is not used or the wrong password is used, the program will report an error "Invalid password".

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1648
Joined: Wed Apr 07, 2021 2:50 am

Thu Dec 16, 2021 9:19 am

Hi Annika,

sounds good, looking forward to those new features. Thank you.

KR,
Gerhard

GerhardFinee
 
Posts: 26
Joined: Thu Nov 07, 2019 7:57 am

Thu Dec 16, 2021 9:29 am

Hello Gerhard,

You're welcome.
Once the new feature achieved in the future, I will notify you in immediately.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1648
Joined: Wed Apr 07, 2021 2:50 am

Mon Jan 24, 2022 10:01 am

Hello,

Thanks for your patience!

Glad to inform you that we just released Spire.XLS Pack Version:12.1 which supports the IsPasswordProtected method to load the file stream。

Please download the fix version from the following links and the following code to test.

Website link: https://www.e-iceblue.com/Download/download-excel-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.XLS/12.1.0
Code: Select all
bool havepwd = Workbook.IsPasswordProtected(File.OpenRead(inputFile));
//another way
var docBytes = File.ReadAllBytes(inputFile);
MemoryStream ms = new MemoryStream(docBytes);
bool havepwd = Workbook.IsPasswordProtected(ms);

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1648
Joined: Wed Apr 07, 2021 2:50 am

Mon Jan 24, 2022 2:11 pm

Hi,

looks nice. Thank you :-)

KR,
Gerhard

GerhardFinee
 
Posts: 26
Joined: Thu Nov 07, 2019 7:57 am

Tue Jan 25, 2022 1:03 am

Hello,

You're welcome.
If you have other questions about using Spire.XLS in the future, please feel free to contact us.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1648
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.XLS