Calc: how to by-pass the protected sheet password

I think I followed the instructions in here:

https://wiki.documentfoundation.org/Faq/Calc/How_to_remove_a_Password_Protected_Sheet_Flag

that is, for a .ods file (on Windows 10):

  • I extracted the files as a zip
  • I open the content.xml file
  • I removed the table:protected and table:protection-key and table:protection-key-digest-algorithm attributes together with their values
  • (with 7-zip) I created a zip from the whole set of files, including the modfied content.xml
  • I reneamed the .zip new file to .ods

Unfortunately, trying to open it with Libreoffice it says that the file is corrupted, if I accept to try to repair, the result is unsuccesful.

Anybody can help?

I always would try to avoid the unpacking and repacking. There may occur complications with paths.
The following is, of course, done with a copy of the workfile.

Use a zipper capable of acting as a file manager, and open the subfile (content.xml in your case - and mostly) directly from the zipper’s UI with the tool of your coice. I prefer Notepad++ with XML tools as an extension. There I do the needed editing, and save the edited file directly back to the zip.

Works for me under Win 10 with very old WinZip or with 7zip (not consoel, of course).

Thanks, I found how to use 7zip, see above.

You didn’t follow the instructions. The FAQ tells to freshen (!) the zip, not create a new zip. It even explains under Nota Bene.

Fwiw, I added a sentence to not create a new zip to each section.

OK, thanks to push me to understand better how 7zip works.
Indeed it does not have a “refreshen” option, this is why I was tempted to try to create.
For info, after opening the archive with 7zip I select Edit from the right-click menu on content.xml. After the updates just go ahead closing the file (saving is not possible, beside refreshening, which misleaded me), and when asked OK the save and then OK the “update in the archive”.

In any case do not create another zip file.

If using 7zip, which does not have the “refreshen” option, follow this:

  • after opening the archive with 7zip select Edit from the right-click menu on content.xml.
  • after the updates (as per the wiki link above) just go ahead closing the file (saving is not possible, nor refreshening)
  • when asked by the appearing dialog, OK the save and then OK the “update in the archive”.