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

Free Support Forum - aspose.com

Reading a excel with password protected sheet. While saving workbook password no longer stays

Here I am opening an excel file. Excel has a sheet which is protected with a password.
myWorkBook = New Aspose.Cells.WorkbookDesigner
myWorkBook.Workbook = New Aspose.Cells.Workbook(inFileName)

After saving the sheet the worksheet remains protected but the password is lost and the sheet now can be modified without a password.
myWorkBook.Workbook.Save(outFileName)

Hi,


Thanks for sharing the details and code segment.

Could you provide your input and output files, we will check your issue soon. Also provide us your password which you used to protect the worksheet.

Thank you.
Password : 1235

inFileName - ysr_sstest
outFileName - niraj_sstest_0 (10)

Hi,


Thanks for your posting and using Aspose.Cells.

We have tested your source excel file with the latest version and the output excel file is still protected with password. It still asks for the password when we try to unprotect it. So, your issue does not exist with the latest version. Please try the latest version and let us know your feedback.

Latest Version Links:
Aspose.Cells for .NET v17.03.3 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.03.3 (.NET 4.0) compiled in .NET Framework 4.0.

In case, your issue still exists, then please provide us sample code which we could run at our end and replicate the issue.

<span class=“comment-copy” style=“margin: 0px; padding: 0px; border: 0px; font-size: 13px; color: rgb(36, 39, 41); font-family: Arial, “Helvetica Neue”, Helvetica, sans-serif; background-color: rgb(255, 255, 255);”>Awesome. Version change did the trick! Thank you @shakeel! Saved my day!<span style=“color: rgb(36, 39, 41); font-family: Arial, “Helvetica Neue”, Helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);”>


Hi,

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the latest version. Let us know if you encounter any other issue, we will be glad to look into it and help you further.