Click here to Skip to main content
16,022,218 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi I have protected an excel file with this code:


Dim objStyleSheetP As SheetProtection = New SheetProtection()
objStyleSheetP.Password = "123"
objStyleSheetP.Sheet = True
objStyleSheetP.Objects = True
objStyleSheetP.Scenarios = True
objStyleSheetP.AutoFilter = False


If I open excel file and I want unlock it writing 123, it shows a message "the password is incorrect".


Thanks for your help

What I have tried:

I have renamed file xlsx into zip and open sheet.xml. The protection password was 0123 but it not is worked too that
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900