Forum Discussion

amitmahapatra's avatar
amitmahapatra
Copper Contributor
Nov 01, 2020

password protected excel in office 365

Hi Experts, 


I know that: 

"Excel for the web can’t open or edit workbooks protected by a password. In fact, passwords can’t be added, changed, removed, or recovered from Excel for the web. If you try to open a password protected workbook, you’ll see a message as it can't be possible and to Open it in Excel button to open the workbook in Excel desktop application". 


Now I have a problem. My company due to sever security legislation has blocked OneDrive. This means I can open one drive in web but can't download anything nor upload to one drive. Because of that my Excel (with password) is not usable. When I am opening it in OneDrive, its asking me to Open in Desktop Excel but I can't download to Desktop Excel because of security reason. So I am stuck.. 


Can anyone please help ?

15 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    amitmahapatra 

    The only option you have is to open the file in another Office package (no Excel for Web, best Excel 2007 to 2016) and unlock the file, see the instractions down unter please, if you need  to open a .xlsm file you need a VBA code.

    If this is necessary, please contact me again.
    You can do this as long as it is your workbook.
    Attention: You may only use the following instructions for your own files. Otherwise you could be liable to prosecution.

    Unprotect Excel sheet without password using 7-ZIP (free software)
    Für diese Anleitung benötigen Sie das Programm 7-Zip, herunterladen können Sie dies in Internet: https://www.7-zip.org/download.html

    Folgen Sie dann unserer Schritt-für-Schritt-Anleitung oder schauen Sie sich die Kurzanleitung an.
    Note: This way only works for Excel file in .xlsx format.
    Hence, if your Excel workbook is in .xls format, just open it and then save it as .xlsx format.

    Step 1: Change the Excel file name extension from .xlsx to .zip. Just click on Yes to make sure when prompted.

    Step 2: Open the ZIP archive as 7-ZIP. Open the folder xl->worksheets and you can see threesheet.xml files. Select the sheet1.xml file. Right click on it and select Edit. Choose to open it withNotepad.

    Step 3: Delete the tag beginning with sheetProtection. Then save and close the sheet1.xml file.

    Step 4: Update the modified sheet1.xml file in the ZIP archive when prompted. Then close the ZIP archive.

    Step 5: Change the ZIP fie name extension back to .xlsx. At this point, the Excel sheet has been unprotected. Open it and you can edit the sheet without password.

    • amitmahapatra's avatar
      amitmahapatra
      Copper Contributor

      NikolinoDE Hi.. thanks for your prompt reply.

       

      This is my worksheet ONLY. I want to avoid keeping it desktop and using it from OneDrive but i can't keep that file in OneDrive without password protected. 

       

      when I was using from desktop i had no issues and even if i download from onedrive and load into desktop using a USB, i am able to use it perfectly. no issues. 

       

      i think you are right, we must have to use VBA coding to have a password prompt before opening the excel sheet (its in .xlxs format) as normal excel feature is not working in office 365..

       

      if you can help with VBA code that can help, it will be awesome... thanking in advance...

      • NikolinoDE's avatar
        NikolinoDE
        Gold Contributor

        amitmahapatra 

        Instructions:
        Open your own password-protected file in Excel.
        Then open a new Excel file (workbook) in parallel.
        Open VBA in the newly opened file (ALT + F11).
        Select worksheet, copy in code in a sheet and execute macro (F5).
        After a short (or long time, depending on the size of the file and the password), a message box appears with the text "Finished".
        Save your file (the one with the ex password) and close everything. Select the file with the ex password, open it and everything works without a password.
         
        Please don't forget to Vote and Mark in the Community forum, my post, as a "right answer" and mark it with a "like" too . As it will be beneficial to more Community members reading in forum of the Community.
         

        Nikolino

        I know I don't know anything (Socrates)

Resources