56
Views
5
Comments
Solved
[Advanced Excel] Advanced Excel Workbook Protect issue.
Question
advanced-excel
Service icon
Forge asset by Carlos Freitas
Application Type
Service

Hi, I am using advanced excel and used Workbook protect to set password in the file, but the file is still not protected when the user opens it. I hope you can help us is this issue? Thank you in advance. 

Workbook protect.PNG
2024-11-07 03-28-42
Stuart Harris
Champion
Solution

Hello Fernan,

I have tested Workbook_Protect using the same parameters as you used, and it does protect the workbook.

Thank you for the screenshot of the code. I think I can see the problem there.

The call to protect the workbook happens after the workbook binary has been generated.

Try putting the Workbook_Protect action before the action to generate the binary of the workbook, and the workbook should be protected with a password.

I hope this helps!

Kind regards,

Stuart

2024-11-07 03-28-42
Stuart Harris
Champion

Thanks Fernan, I will run a test with the latest release and check the results.

2024-11-07 03-28-42
Stuart Harris
Champion
Solution

Hello Fernan,

I have tested Workbook_Protect using the same parameters as you used, and it does protect the workbook.

Thank you for the screenshot of the code. I think I can see the problem there.

The call to protect the workbook happens after the workbook binary has been generated.

Try putting the Workbook_Protect action before the action to generate the binary of the workbook, and the workbook should be protected with a password.

I hope this helps!

Kind regards,

Stuart

UserImage.jpg
Fernando Galfo

Thank you Stewart, I will try this and update you. 

Best Regards.

UserImage.jpg
Fernando Galfo

Hi Stewart, 


It worked Thanks for your support.



2024-11-07 03-28-42
Stuart Harris
Champion
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.