# Can not open password encrypted CALC/XLS file

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 close merge delete

Sort by » oldest newest most voted

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: www.hexedit.com
2. SS Viewer: http://www.mitec.cz/ssv.html

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.

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 5.3.2.4 (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.

( 2018-04-22 08:53:40 +0200 )edit

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

( 2018-04-22 09:06:01 +0200 )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.

( 2018-04-22 09:06:13 +0200 )edit

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

Thanks!

more

## Stats

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

Seen: 1,277 times

Last updated: Feb 18 '17