Welcome to OpenXML Developer Sign in | Join | Help

Detection of Password Protectection of .xlsx (office 2007) document.

Last post 06-27-2008, 4:18 AM by gkrishnat. 0 replies.
Sort Posts: Previous Next
  •  06-27-2008, 4:18 AM 3416

    Detection of Password Protectection of .xlsx (office 2007) document.

     

    HI

    I have a MS excel 2007 workbook (.xlsx) which is password protected. Both the workbook and sheet are protected by password. Now I want to change the custom property value of the .xlsx file.

     

    If there is No password protection then I could able to change the custom property value. I am zipping the .xlsx file - Unzipping it to a folder - accessing the custom.xml file and changing the property value. Then again I am zipping it back to .xlsx file. But if the  workbook \ sheet is protected by password then it is throwing an error while unzipping .zip file.

     

    Is there any easy way to check that .xlsx worbook / sheet is password protected or not ? Is there any help in OpenXML for this ? While zipping - unzipping the .xlsx file is there a way to ask for the password from user ?

     

    Please let me know if you want any more input from my side.

     

    Thanks in advance.

     

    With Regards,

    Gopi Krishna Thakur

View as RSS news feed in XML