we open a workbook (having protection and a password for it) with IG excel engine. After writing data to some cells we then save the workbook with a different name.
This copy is still protected, but doesn't have a password for the protection anymore. The user can simply press the "unprotect Sheet" button and is not not asked for a password.
This is a huge problem for us.
Thank you for posting.
In order to reproduce the issue may I know which product and build number of 18.2 you are using?
As excel engine is a cross-platform control, in order to reproduce the issue, I created a simple sample of WPF excel engine, loading a password protected worksheet to the spreadsheet, and not able reproduce the scenario you described. I am not able to open my password protected sheet after I load into a spreadsheet.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, then the change in behavior is due to differences in your environment from mine and these differences can be anything from operating system version to the specific version of the Infragistics DLL versions used. My test was performed using version 18.2.20182.164. Please provide more details about your machine and version of the assemblies that you are referencing so that I can modify the environment that I am testing in to match yours.
If the project does show the product feature working correctly, then more information will be needed to reproduce the issue in a sample that can be used for debugging. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing. This can be done by either making the sample that I provided more like your application or by isolating the behavior from your application by removing dependencies on any third parties or databases.
Please let me know if I can provide any further assistance.
we did not password protect the entire workbook so that you need a password to open it.
We protected several cells in different worksheets against editing and used a password for this protection of cells. This password is lost after opening and saving the workbook with the IG Xl engine and the user can unprotect the cells by simply clicking the button "Unprotect Sheet" without being prompted for a password. It is important that we protect WORKSHEETS rather than the Workbook.
We are using Version 18.2.20182.186
Thank you for your assistants.
Thank you for the update.
The best way for us to assist you is if you provide a small isolated sample that we can run and use for debugging locally.
If you are unable able to provide an isolated sample I may be able to give suggestions if you provide the code for your page.
Looking forward to hear you back.
Sincerely,Divya JainAssociate Software Developer
I've modified your sample and get the same result (lost password).
In the zip file there are also two screenshots of 1. how to protect the worksheet with a password (pwd: test) and 2. how to unprotect it using that password.
Please open the excel workbook with excel first, to verify that a password (pwd: test) is in fact needed to unprotect the worksheet. But DON'T unprotect the worksheet at this point (just cancel) because you want to test it with the sample code.
If you then run your sample, which just opens the workbook and saves it again, and afterwards open the excel file in excel....a password is not required to unprotect the worksheet.
This is clearly a bug, that is a huge problem for us.
Unfortunately I'm getting error trying to attach the ZIP-file....I've mailed it to you...
Thank you for the update. Unfortunately, sample dint come through the email also.
Please delete the bin folder of the project in order to reduce the size of the project and attach it again as l did , would not cause any issue.