Encrypted Calc file got corrupted

Dear Group,

I have a problem for which I am hoping to get some help from you.

I am trying to open an encrypted Calc ods file with some quite important
data in it, however, when I type in the password after being prompted to
do so, I get an error message "The file is corrupt and therefore cannot be
opened. LibreOffice can try to repair the file."

When I press 'Yes' to repair the file, nothing really happens, the file
still doesn't open, and next time I try to open the file, I get the same
error message.

Could you please help me fix this somehow? As mentioned this file contains
some important data.

Thanks a lot indeed in advance, really appreciated!

Best,
Adam

Hi :slight_smile:
1. Please make a copy of the file, so you've got a back-up copy if advice
or trying things out doesn't go smoothly!

2. Try rejecting the offer when it offers to fix the corruption. Let us
know what happens!

If you are on Windows then defragging might help

Do you have another copy of the file anywhere? Have you emailed it to
yourself or anyone?
Regards from
Tom :slight_smile:

Hi Tom,

Many thanks for your reply!

If I click 'No' to 'Try to repair the file', I get another error message,
'The file could not be repaired and therefore cannot be opened.', and when
I click OK, I get another error message 'General Error'. If I then try to
open the file again, I've still got the same issue as before.

I am on Windows so I can try defragging, but unfortunately this file was
not created by me, it was shared with me through the cloud, thus, I never
really had the original unencrypted file. So I assume defragging should be
run on the computer where the original file was created.

I don't have another copy of this file unfortunately, but I would be happy
to send you a link where you could also download it from in case you have
any file recovery tools. Please let me know if this is feasible.

Many thanks indeed for your help!

Best,
Adam

Adam, do you know whether the file was ever free from corruption before upload to the cloud? Is it possible for the originator to upload again?

Cheers

Tim,

Many thanks for your reply.

I don't know unfortunately, I would assume the file wasn't corrupted before encryption, but I don't know for fact, and I don't know if there was ever a version of the encrypted file that was free from corruption.

The originator of the file will not have access to the original file for a few weeks at least, unfortunately.

Many thanks for your help!

Best,
Adam

Adam Bujdoso wrote:

Dear Group,

I have a problem for which I am hoping to get some help from you.

I am trying to open an encrypted Calc ods file with some quite important
data in it, however, when I type in the password after being prompted to
do so, I get an error message "The file is corrupt and therefore cannot be
opened. LibreOffice can try to repair the file."

When I press 'Yes' to repair the file, nothing really happens, the file
still doesn't open, and next time I try to open the file, I get the same
error message.

Could you please help me fix this somehow? As mentioned this file contains
some important data.

It may seem like a silly question, but are you absolutely certain you're entering the correct password? I'm not sure whether LibreOffice can tell the difference between a corrupted file and one which has been decrypted with the wrong password.

If you're typing the password, make sure you haven't got caps lock on (and if using a laptop keyboard, make sure num lock isn't on either), and that you're definitely typing it correctly. Also check that the keyboard is configured correctly for any punctuation characters, e.g. Shift+2 is a double-quote (") on a UK keyboard but an at-sign (@) on an American keyboard; if the keyboard isn't configured correctly, you could think you're typing a double-quote, but the software might get an at-sign.

If you're copying the password (e.g. from an email) make sure you're not accidentally copying extra spaces at the beginning or end. Some applications automatically include spaces around a word. Also check whether or not any punctuation around the password is part of the password - e.g. if you have an email saying "The password is Password1.", check whether or not the full-stop is part of the password. I had that once trying to log into a web site with an initial default password - I thought the full-stop was the end of the sentence telling me what the password was, but it turned out it was part of the password!

Mark.

Mark, Many thanks indeed for your advice, these are all very valid points.
I think I have been entering the password correctly, but I will
double-check for sure.

Does anyone have an idea how the file could be repaired? I am happy to
forward the file if someone has a tool to examine it, or perhaps to recover
it.

Many thanks for your help!

Best,
Adam

​Unfortunately, I can't do it myself because I lack the time to do so, but
if someone's up to the task, it could be interesting to have an "extractor"
for secured files.

"just" like regular files, meaning that they still are ZIP containing
multiple files. The password-protection is not at the ZIP level, but
instead relevant files are encrypted before they are stored in the ZIP
file.​ To remain efficient, these files are compressed using deflate (the
same algorithm used in zip files) *before* encryption, and then simply
stored in the ZIP file.

An extracting tool could extract the content of the ODT/ZIP file, and using
the password decrypt the relevant files. This would make the file
"components" available for further examination. Since sometimes file
corruption can merely mean a malformed closing tag in the XML that makes up
the core of a document, it could be helpful.

This could also make for a useful side-tool for LibreOffice, since these
corruptions, as rare as they are, still happens sometimes even on
unencrypted files.

Cley, thanks a lot, that indeed sounds like a good suggestion as these
corruptions do happen every once in a while.

Is there perhaps any other way to repair/analyse the file?

Many thanks again to everyone.

Best,
Adam