password protected excel in office 365

%3CLINGO-SUB%20id%3D%22lingo-sub-1843150%22%20slang%3D%22en-US%22%3Epassword%20protected%20excel%20in%20office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1843150%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Experts%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20know%20that%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%22Excel%20for%20the%20web%20can%E2%80%99t%20open%20or%20edit%20workbooks%20protected%20by%20a%20password.%20In%20fact%2C%20passwords%20can%E2%80%99t%20be%20added%2C%20changed%2C%20removed%2C%20or%20recovered%20from%20Excel%20for%20the%20web.%20If%20you%20try%20to%20open%20a%20password%20protected%20workbook%2C%20you%E2%80%99ll%20see%20a%20message%20as%20it%20can't%20be%20possible%20and%20to%20Open%20it%20in%20Excel%26nbsp%3Bbutton%20to%20open%20the%20workbook%20in%20Excel%20desktop%20application%22.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ENow%20I%20have%20a%20problem.%20My%20company%20due%20to%20sever%20security%20legislation%20has%20blocked%20OneDrive.%26nbsp%3BThis%20means%20I%20can%20open%20one%20drive%20in%20web%20but%20can't%20download%20anything%20nor%20upload%20to%20one%20drive.%20Because%20of%20that%20my%20Excel%20(with%20password)%20is%20not%20usable.%20When%20I%20am%20opening%20it%20in%20OneDrive%2C%20its%20asking%20me%20to%20Open%20in%20Desktop%20Excel%20but%20I%26nbsp%3Bcan't%20download%20to%20Desktop%20Excel%20because%20of%20security%20reason.%20So%20I%20am%20stuck..%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ECan%20anyone%20please%20help%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1843150%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20for%20web%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1843566%22%20slang%3D%22de-DE%22%3EAttention%3A%20The%20following%20instructions%20may%20only%20be%20used%20for%20IhBesubject%3A%20password%20protected%20excel%20in%20office%20365%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1843566%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F853783%22%20target%3D%22_blank%22%3E%40amitmahapatra%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EThe%20only%20option%20you%20have%20is%20to%20open%20the%20file%20in%20another%20Office%20package%20(no%20Excel%20for%20Web%2C%20best%20Excel%202007%20to%202016)%20and%20unlock%20the%20file%2C%20see%20the%20instractions%20down%20under%20please%2C%20if%20you%20need%20to%20open%20a%20.xlsm%20file%20you%20need%20a%20VBA%20code.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EIf%20this%20is%20necessary%2C%20please%20contact%20me%20again.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22%22%3EYou%20can%20do%20this%20as%20long%20as%20it%20is%20your%20workbook.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22%22%3EAttention%3A%20You%20may%20only%20use%20the%20following%20instructions%20for%20your%20own%20files.%3C%2FSPAN%3E%20%3CSPAN%3EOtherwise%20you%20could%20be%20liable%20to%20prosecution.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EUnprotect%20Excel%20sheet%20without%20password%20using%207-ZIP%20(free%20software)%3C%2FSTRONG%3E%3CBR%20%2F%3E%20For%20this%20guide%20you%20need%20the%20program%207-Zip%2C%20you%20can%20download%20this%20in%20Internet%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.7-zip.org%2Fdownload.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.7-zip.org%2Fdownload.html%3C%2FA%3E%3C%2FP%3E%3CP%3EThen%20follow%20our%20step-by-step%20guide%20or%20take%20a%20look%20at%20the%20quick%20guide.%3CBR%20%2F%3E%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%20This%20way%20only%20works%20for%20Excel%20file%20in%20.xlsx%20format.%3CBR%20%2F%3EHence%2C%20if%20your%20Excel%20workbook%20is%20in%20.xls%20format%2C%20just%20open%20it%20and%20then%20save%20it%20as%20.xlsx%20format.%3C%2FP%3E%3CP%3EStep%201%3A%20Change%20the%20Excel%20file%20name%20extension%20from%20.xlsx%20to%20.zip.%20Just%20click%20on%20Yes%20to%20make%20sure%20when%20prompted.%3C%2FP%3E%3CP%3EStep%202%3A%20Open%20the%20ZIP%20archive%20as%207-ZIP.%20Open%20the%20folder%20xl-%26gt%3Bworksheets%20and%20you%20can%20see%20threesheet.xml%20files.%20Select%20the%20sheet1.xml%20file.%20Right%20click%20on%20it%20and%20select%20Edit.%20Choose%20to%20open%20it%20withNotepad.%3C%2FP%3E%3CP%3EStep%203%3A%20Delete%20the%20tag%20beginning%20with%20sheetProtection.%20Then%20save%20and%20close%20the%20sheet1.xml%20file.%3C%2FP%3E%3CP%3EStep%204%3A%20Update%20the%20modified%20sheet1.xml%20file%20in%20the%20ZIP%20archive%20when%20prompted.%20Then%20close%20the%20ZIP%20archive.%3C%2FP%3E%3CP%3EStep%205%3A%20Change%20the%20ZIP%20fie%20name%20extension%20back%20to%20.xlsx.%20At%20this%20point%2C%20the%20Excel%20sheet%20has%20been%20unprotected.%20Open%20it%20and%20you%20can%20edit%20the%20sheet%20without%20password.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1843646%22%20slang%3D%22en-US%22%3ERe%3A%20Achtung%3A%20Die%20folgende%20Anleitung%20d%C3%BCrfen%20Sie%20nur%20f%C3%BCr%20IhBetreff%3A%20password%20protected%20excel%20in%20office%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1843646%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40Nikolino%3C%2FA%3E%26nbsp%3BHi..%20thanks%20for%20your%20prompt%20reply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20my%20worksheet%20ONLY.%20I%20want%20to%20avoid%20keeping%20it%20desktop%20and%20using%20it%20from%20OneDrive%20but%20i%20can't%20keep%20that%20file%20in%20OneDrive%20without%20password%20protected.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewhen%20I%20was%20using%20from%20desktop%20i%20had%20no%20issues%20and%20even%20if%20i%20download%20from%20onedrive%20and%20load%20into%20desktop%20using%20a%20USB%2C%20i%20am%20able%20to%20use%20it%20perfectly.%20no%20issues.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20think%20you%20are%20right%2C%20we%20must%20have%20to%20use%20VBA%20coding%20to%20have%20a%20password%20prompt%20before%20opening%20the%20excel%20sheet%20(its%20in%20.xlxs%20format)%20as%20normal%20excel%20feature%20is%20not%20working%20in%20office%20365..%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eif%20you%20can%20help%20with%20VBA%20code%20that%20can%20help%2C%20it%20will%20be%20awesome...%20thanking%20in%20advance...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1843852%22%20slang%3D%22de-DE%22%3ERe%3A%20Attention%3A%20The%20following%20instructions%20may%20only%20be%20used%20for%20IhBesubject%3A%20password%20protected%20excel%20in%20office%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1843852%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F853783%22%20target%3D%22_blank%22%3E%40amitmahapatra%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22text-wrap%20tlid-copy-target%22%3E%3CDIV%20class%3D%22result-shield-container%20tlid-copy-target%22%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22%22%3EInstructions%3A%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSPAN%3EOpen%20your%20own%20password-protected%20file%20in%20Excel.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22%22%3EThen%20open%20a%20new%20Excel%20file%20(workbook)%20in%20parallel.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22%22%3EOpen%20VBA%20in%20the%20newly%20opened%20file%20(ALT%20%2B%20F11).%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ESelect%20worksheet%2C%20copy%20in%20code%20in%20a%20sheet%20and%20execute%20macro%20(F5).%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22%22%3EAfter%20a%20short%20(or%20long%20time%2C%20depending%20on%20the%20size%20of%20the%20file%20and%20the%20password)%2C%20a%20message%20box%20appears%20with%20the%20text%20%22Finished%22.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ESave%20your%20file%20(the%20one%20with%20the%20ex%20password)%20and%20close%20everything.%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22%22%3ESelect%20the%20file%20with%20the%20ex%20password%2C%20open%20it%20and%20everything%20works%20without%20a%20password.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22result-shield-container%20tlid-copy-target%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22tlid-result-transliteration-container%20result-transliteration-container%20transliteration-container%22%3E%3CDIV%20class%3D%22tlid-transliteration-content%20transliteration-content%20full%22%3EPlease%20don't%20forget%20to%20Vote%20and%20Mark%20in%20the%20Community%20forum%2C%20my%20post%2C%20as%20a%20%22right%20answer%22%20and%20mark%20it%20with%20a%20%22like%22%20too%20.%20As%20it%20will%20be%20beneficial%20to%20more%20Community%20members%20reading%20in%20forum%20of%20the%20Community.%3C%2FDIV%3E%3CDIV%20class%3D%22tlid-transliteration-content%20transliteration-content%20full%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22tlid-transliteration-content%20transliteration-content%20full%22%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1847245%22%20slang%3D%22en-US%22%3ERe%3A%20Achtung%3A%20Die%20folgende%20Anleitung%20d%C3%BCrfen%20Sie%20nur%20f%C3%BCr%20IhBetreff%3A%20password%20protected%20excel%20in%20office%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1847245%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40Nikolino%3C%2FA%3E%26nbsp%3BHi%26nbsp%3B%3CSPAN%3ENikolino%20..%20my%20apologies%20for%20the%20confusion.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Ewhat%20my%20requirement%20is%20to%20be%20able%20to%20use%20the%20same%20Password%20protection%20while%20opening%20the%20excel%20in%20office%20365%20in%20similar%20way%2C%20i%20am%20currently%20using%20in%20desktop%20version%20of%20excel.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20know%20that%20with%20office365%20you%20can%20use%20the%20password%20option%20by%20opening%20the%20excel%20in%20desktop%20mode%20but%20in%20my%20office%20i%20can't%20download%20anything%20from%20OneDrive%20to%20desktop..%20so%20i%20am%20not%20able%20to%20use%20the%20excel%20by%20opening%20through%20password%2C%20else%20i%20know%20the%20password%20and%20i%20can%20open%20it%20in%20my%20personal%20laptop...%20its%20just%20in%20my%20office%20laptop%20i%20can't...%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Eso%20i%20am%20looking%20for%20a%20VBA%20solution%20which%20i%20want%20to%20use%20in%20the%20excel%20to%20ask%20for%20password%20before%20i%20open%20the%20excel%20in%20office365%20without%20downloading%20to%20desktop%20excel%20application.%26nbsp%3B%20I%20want%20to%20keep%20the%20password%20asking%20option%20before%20opening%20the%20excel.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20hope%20this%20one%20is%20clear%20now.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

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 ?

9 Replies
Highlighted

@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.

Highlighted

@Nikolino 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...

Highlighted

@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)

Highlighted

@Nikolino Hi Nikolino .. my apologies for the confusion.

 

what my requirement is to be able to use the same Password protection while opening the excel in office 365 in similar way, i am currently using in desktop version of excel.

 

I know that with office365 you can use the password option by opening the excel in desktop mode but in my office i can't download anything from OneDrive to desktop.. so i am not able to use the excel by opening through password, else i know the password and i can open it in my personal laptop... its just in my office laptop i can't...

 

so i am looking for a VBA solution which i want to use in the excel to ask for password before i open the excel in office365 without downloading to desktop excel application.  I want to keep the password asking option before opening the excel.

 

I hope this one is clear now.

Highlighted

@amitmahapatra 

As far as I've tried with my Excel for Web, if it can't open from OneDrive, he asks whether he can / may open the file from a desktop version and it works without problems. My Excel desktop then opens automatically without problems and asks for the password as usual.


Please update your PC and try again.


Some Further information below for your additional Info.

 

Work with VBA macros in Excel for the web

https://support.microsoft.com/en-us/office/work-with-vba-macros-in-excel-for-the-web-98784ad0-898c-4...

Excel for the web

https://docs.microsoft.com/en-us/office365/servicedescriptions/office-online-service-description/exc...

 

Sorry that I couldn't help anymore.

Thank you for your understanding and patience

 

 

Nikolino

I know I don't know anything (Socrates)

 

Highlighted
Hi, yes you are right. I can do that in my own pc but not in office laptop because my company has blocked to download anything from One drive.. So I can update or upgrade anything in office laptop to work this...

The only way for me is to remove the normal password and have a VBA password encoded in the excel that will ask for password when open in office365 from one Drive on Web..

Can you please help with a code in VBA that can be used to ask for password when opening a Excel sheet? This is exactly what I need..
Highlighted

@amitmahapatra 

 

My last thought is a manual solution so that you are also compliant with your company regulations. A USB stick from home with the files you want to edit at work and back at home with the stick to overwrite the existing files in your OneDrive.

It is tedious, but bypassing all possible regulations that are on your way. At the same time you are on the safe side that you are not breaking any company rules.

It's just a thought
 

Sorry that I took your time and couldn't give you a quick solution.

 

Wish you a nice day.

Nikolino

I know I don't know anything (Socrates)

Highlighted
Thanks for your suggestions.. Really appreciate it..

Well I was not asking to break the rule rather i will follow the rule by not downloading it to desktop and still able to use password to open the file.. Anyways let's leave it..
Highlighted
Sorry for misunderstanding me, didn't say you wanted to break the rules. I just said that you are on the safe side and that you can keep the rules safely.

Anyway, my mistake if it's gotten wrong.
Must improve my english to avoid misunderstandings.

I wish you a nice day and much success for a solution of your project.

Nikolino
I know I don't know anything (Socrates)