Ask Your Question

Can not open password encrypted CALC/XLS file [closed]

asked 2017-02-17 10:37:48 +0100

Michael-ALO gravatar image

updated 2020-09-24 22:35:05 +0100

Alex Kemp gravatar image

I have opened a password encrypted XLS file (Excel 2016) with Libre Office 5.3. Opening is no problem. After some changes I stored the file in Excel 1997-2003 format. When I try to open the file again with Libre Office, a password is requested, but when entering the correct password from the original XLS file I get the message "Password is not correct". As consequence, I can not open the fle anymore, neither with Libre Office nor with Excel.

Any hints?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-09-24 22:36:23.945693

2 Answers

Sort by » oldest newest most voted

answered 2017-02-17 19:27:09 +0100

Michael-ALO gravatar image

Any chance to open the file? Was my only copy, and now I can no longer access the changes I made.


edit flag offensive delete link more

answered 2017-02-17 15:13:06 +0100

updated 2017-02-18 03:13:06 +0100

That's a bug in LO. It is fixed in 5.4 (master), but I cannot check atm if it is fixed in coming 5.3.1.

Actually, the file isn't protected anymore. It just contains empty data that must not be there, and that makes both LO and Excel handle it as encrypted.

There is a method to restore the file. You need to edit the file with hex editor, though. Disclaimer: the following is only tested once with a test file sample, and may be inaccurate. I don't take any responsibility wrt correctness of following recommendations.

I used two free tools in my test, both of them can be used without installation:

  1. Hex Edit:
  2. SS Viewer:

First, you need to backup your file, and always have its safe copy.

  1. Open the file with with SS Viewer, and right-click on Workbook stream in left tree. Save stream to an external file.
  2. Then open the saved stream file with Hex Edit and go to offset 0x14 - it should start with 2F 00.
  3. Now select to offset 0x4E (not including the E1 00 value) - the selection must be 58 bytes long, start with 2F 00, and end with 00 00 - and delete selection.
  4. Now close the Hex Edit and return to SS Viewer, right-click on the Workbook stream again, and choose to load stream from file. Accept default encoder, and choose the edited stream file.

After the procedure completed, the file should become readable again.

edit flag offensive delete link more


Sounds complicated (I have done hex editing of documents for forensics). Before going there, may just download the latest DEV version of LO. I encountered the same thing when I was toying with (not sure of the exact build). I saved a CALC file in ODS format and encountered the problem when I used the production version of LO distributed by Ubuntu (5.1.2 I think). As noted elsewhere, this is peculiar to CALC. Did not encounter this problem with DOCX or ODT.

EricN gravatar imageEricN ( 2018-04-22 08:53:40 +0100 )edit

Just gave it a shot. My CALC file has a totally different layout. The ranges you specified only cover the filetype designation.

EricN gravatar imageEricN ( 2018-04-22 09:06:01 +0100 )edit

The problem discussed in this topic is only related to XLS format. If you encounter something similar with ODS, then it is definitely different issue, which deserves its own topic, and a bug report.

Mike Kaganski gravatar imageMike Kaganski ( 2018-04-22 09:06:13 +0100 )edit

Question Tools

1 follower


Asked: 2017-02-17 10:37:48 +0100

Seen: 2,109 times

Last updated: Feb 18 '17