[Solved] Corrupted .ods Calc files

Discuss the spreadsheet application
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

[Solved] Corrupted .ods Calc files

Post by Prometheus76 »

I am quite upset at this point... two spreadsheets I have been working on have both become corrupted recently. One file, I put eight months of work into and the other one, just a couple weeks. I think both incidents happened after making additions to the files and then trying to save them but I couldn't. I don't remember what I did after... I either canceled the attempt and/or closed the program. Then felt so bad because all that work was lost. There may have been an error saying general error or input/output error, I don't recall and possibly that a backup couldn't be made for whatever reason. Upon attempting to re-open the files, the program tries to repair them but fails. Why is this happening? How can it be stopped? If the program is flawed, it should be patched.

I searched for free repair sites or programs. I used an online one but it couldn't fix the file. It said there was some problem in a particular row and column or something to that effect. People are selling programs that supposedly repair corrupted files for $100 or more but there's no guarantee that it will do anything and then it's just a waste of all that money. I tried some solution I saw about changing the .ods to .zip, opening file and doing something with the components that show up but when I open the zip file, it just makes another file, with the original file name, with the number 2 after it.

If it means anything, I'm running OpenOffice 4.1.5 on Mac OS X 10.13.6 High Sierra and I open and save the files from/on a usb flash drive... not from the main computer hard drive.

Is anyone else having this problem? Have you found a solution? Any help would be appreciated. Thanks!
Last edited by Prometheus76 on Tue Oct 30, 2018 1:39 pm, edited 1 time in total.
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: corrupted .ods Calc files

Post by robleyd »

If the error you get is similar to format error discovered in the sub-document then if you upload the original documents someone may be able to look at them.

[Forum] How to attach a document here Note maximum file size is 128K. If your file is larger, use a file sharing site such as Mediafire and post the link here.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: corrupted .ods Calc files

Post by Prometheus76 »

The sub-document part sounds familiar but I don't know if OpenOffice said that or the free repair site online did or if it was part of what I read about making the .ods a .zip to try and repair the file

Anyway, here are the links to the corrupted files... http://www.mediafire.com/file/5magaczcl ... O.ods/file and http://www.mediafire.com/file/50055lyak ... M.ods/file

For some reason, the zEPNO corrupted file is about half the size of a previous backup of the original file I made myself but the zSSM corrupted file is the same size as my backup. Neither backup I made was as up to date as the files before they became corrupted though

Hopefully it's something simple to fix and recover... I just don't know how. Thanks for your help!
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: corrupted .ods Calc files

Post by RoryOF »

Please send me an enail address to which I can return the repaired files. As far as I can ascertain the files are similar - the repaired files are nne pages long, ending in reference 17. Posnack.... (etc)
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: corrupted .ods Calc files

Post by Prometheus76 »

What was the issue? Was it something I did or is it inherent in the program? How did you determine the problem? What did you do to fix it? Is it something I can do myself next time? Would saving my files as .xls instead of .ods have made them more 'stable'? I'll pm you my e-mail. Thank you very much!
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: corrupted .ods Calc files

Post by RoryOF »

Saving your files as .xls would not help - they seem to be Writer files (I have not examined closely) - they are actually .odt.

What went wrong? A common problem - track changes is enabled, multiple comments from multiple commentators. Apply each layer of changes rather than having many layers of changes, Ditto with the comments.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Corrupted .ods Calc files

Post by John_Ha »

See [Tutorial] Differences between Writer and MS Word files for problems when tracking changes with AOO and MS Office. MS Office corrupts the AOO file.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: corrupted .ods Calc files

Post by Prometheus76 »

RoryOF wrote:Saving your files as .xls would not help - they seem to be Writer files (I have not examined closely) - they are actually .odt.

What went wrong? A common problem - track changes is enabled, multiple comments from multiple commentators. Apply each layer of changes rather than having many layers of changes, Ditto with the comments.
They are not Writer files... I never used that program. I only use Calc and save the files in the native format of (.ods). You can't save a spreadsheet as (.odt).

Record is not enabled in Edit/Changes/Record.

When I try to open zEPNO.ods, I get the repair file dialog box. If I say yes, it says the file '$(ARG1)' couldn't be repaired and therefore can't be opened. I click ok, it says general error. I click ok again, the end.
If after I get the repair dialog, I say no... it says zEPNO.ods couldn't be repaired and therefore can't be opened. I click ok, it says general error - general input/output error. I click ok, the end.

With the zSSM.ods file, when I try to open it, I get a dialog box about ASCII filter options that I cancel out of.
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted .ods Calc files

Post by RoryOF »

The two files you provided open in OO Writer - when you open one, you should see OpenOffice Writer on the title bar. OpenOffice internally uses the correct OO application for the type of file, which it takes from internal identification. Were you able to open the two repaired files I sent? Were they substantially correct?

When I opened them, /Edit /Changes /Record was enabled, and the files showed a history of changes. Perhaps some other Forum volunteer will download and confirm.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: Corrupted .ods Calc files

Post by Prometheus76 »

RoryOF wrote:The two files you provided open in OO Writer - when you open one, you should see OpenOffice Writer on the title bar. OpenOffice internally uses the correct OO application for the type of file, which it takes from internal identification. Were you able to open the two repaired files I sent? Were they substantially correct?

When I opened them, /Edit /Changes /Record was enabled, and the files showed a history of changes. Perhaps some other Forum volunteer will download and confirm.
Those files you sent weren't even mine... I don't know what that was. My files can be downloaded using the mediafire links above. thanks
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted .ods Calc files

Post by RoryOF »

I have just rechecked your links - both files provided were Julie Boberg etc files, as I fixed and returned to you.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted .ods Calc files

Post by RoryOF »

OK, I've moved to another computer and another browser and now managed to download the z*.ods files - why they are not downloading correctlyon my main computer I haven't time to invesigate. From these I get nothing useable - they are corrupt archives - sorry.

If you have copies of the orginal (damaged) files, before any recovery attempts were saved over them, it may be possible to recover something.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: Corrupted .ods Calc files

Post by Prometheus76 »

RoryOF wrote:OK, I've moved to another computer and another browser and now managed to download the z*.ods files - why they are not downloading correctlyon my main computer I haven't time to invesigate. From these I get nothing useable - they are corrupt archives - sorry.

If you have copies of the orginal (damaged) files, before any recovery attempts were saved over them, it may be possible to recover something.
I sent you a WeTransfer link with 4 files... the 2 corrupted ones and the last 2 backups I made of when they worked
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted .ods Calc files

Post by RoryOF »

The backups are OK, and opened correctly for me. The two others are utterly corrupted and do not open with any tool at my command. I think you will have to revert to the two backup files and redo your edits since they were made.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: Corrupted .ods Calc files

Post by Prometheus76 »

RoryOF wrote:The backups are OK, and opened correctly for me. The two others are utterly corrupted and do not open with any tool at my command. I think you will have to revert to the two backup files and redo your edits since they were made.
That sucks :( Thanks for trying. Why does it happen and how can I prevent it from happening again?
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted .ods Calc files

Post by RoryOF »

This type of damage to files is often caused by over-hasty powering down of the computer or closing the lid of a laptop, before the essential housekeeping has been written to disk from the internal buffers in the hard drive. To minimise its chance of happening, it is best to use the formal computer shutdown procedure, then wait a few seconds for all disk activity to cease.

It can also occur when copying files from a computer to an external device such as a USB stick, if the correct USB removal protocols are not observed.

Providing the few extra seconds needed to give file integrity will be much less stressful than the time and effort needed to repair, or more likely, to rebuild, a damaged file.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: Corrupted .ods Calc files

Post by Prometheus76 »

RoryOF wrote:This type of damage to files is often caused by over-hasty powering down of the computer or closing the lid of a laptop, before the essential housekeeping has been written to disk from the internal buffers in the hard drive. To minimise its chance of happening, it is best to use the formal computer shutdown procedure, then wait a few seconds for all disk activity to cease.

It can also occur when copying files from a computer to an external device such as a USB stick, if the correct USB removal protocols are not observed.

Providing the few extra seconds needed to give file integrity will be much less stressful than the time and effort needed to repair, or more likely, to rebuild, a damaged file.
I understand what you're saying but I'm on an iMac. I don't hold the power button to shut down... I go to the Apple menu and click shut down.
I don't pull the flash drive out until after I saved my work and then drag the drive to the trash to eject it before shutting down.
Or I save my work and shutdown the computer with the flash drive still in and then pull it out afterwards.
Sometimes I pull the flash drive out while the computer is shutting down still but I already saved the files... could that cause a problem anyway? It's a 16 gb flash drive with 1 gb available... would little space left cause a saving problem?
My iMac has two hard drives in it... the main drive is an ssd and the secondary drive is a regular hdd. Is it a safer practice to save my files to the hdd rather than the ssd and just work off the computer instead of the usb drive?
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: Corrupted .ods Calc files

Post by Prometheus76 »

RoryOF wrote:The backups are OK, and opened correctly for me. The two others are utterly corrupted and do not open with any tool at my command. I think you will have to revert to the two backup files and redo your edits since they were made.
What programs/tools did you use? Did you try changing the .ods to .zip and seeing if a bunch of files show up, maybe something you can open in notepad? I'm not so worried about if it opens again as a spreadsheet or not but if parts of it are still readable in a text editor, that would be good to know. thanks!
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted .ods Calc files

Post by RoryOF »

The backups opened using my normal OpenOffice. The other two files would not open using my system archiver, which reported them as improperly formed and /or corrupt archives. I did not attempt further recovery.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: Corrupted .ods Calc files

Post by Prometheus76 »

I appreciate RoryOF's efforts in trying to repair/retrieve any information from my two corrupted files but I'm not ready to give up hope just yet. There has to be a way to make part, if not all, of those files readable again even just in a text editor if OO won't do it.

I see a lot of people viewing/following this topic which means you're all having the same problem yet no one else is suggesting any alternate possible solutions to try and attempt to see if I can get anything back from those files at all.

I did a little experiment on my own from something I read online, changing the .ods to .zip and expanding the archive. I did that on both my iMac and my pc laptop using StuffIt Expander. On the iMac, the .zip file opens back to an .ods file with the number 2 after it with no change in file size and OO still couldn't open it. On the pc, the .zip file opened to an .ods file with double the file size (which was encouraging) but it still didn't open in OO. I never see this content.xml file that's supposed to be there after unpacking the archive to take the experiment any further though.

Anyone else have any other other suggestions? Thanks!
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Corrupted .ods Calc files

Post by John_Ha »

Prometheus76 wrote:I'm not ready to give up hope just yet
Don't waste your time on these files.

Your first file zEPNO.ods is a zip file in which you have stored zzExoplanetsneworder.ods. The file zzExoplanetsneworder.ods is hopelessly corrupted. It is not a zip file, as it should be, and it is full of garbage and null characters. There is no user data in it.

Your second file zSSM.ods is not a zip file, as it should be, and it is complete garbage and nulls. There is no user data in it. Interestingly, 4k blocks of garbage and 4k blocks of nulls alternate throughout the file suggesting it is garbage from memory which uses 4k blocks???

If you want to get back your files your only hope is to see [Tutorial] How to find and un-delete AOO temporary files for

a) detailed instructions on how to recover your file as it was when you last opened or saved it, or as it was when it was last saved with AutoRecovery;

b) how to find previous versions of the file in the folder it is located in, but which have since been deleted;

c) how to un-delete the temporary files AOO wrote while you were editing the file, and then deleted. This will recover your file as it was when you last opened or you last saved it and is probably your best hope.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted .ods Calc files

Post by RoryOF »

Usually corrupt files are due to a system or program crash, or over-hasty power-off of the computer before the files have been fully written to disk - remember that modern hard drives have internal buffering, which requires power a little longer than you think for the data to be writen to disk. Such corruption (not to the extent John_Ha and I are seeing on your files) is sometimes due to improper handling or removal of USB devices, and sometmes by "bit rot", aging of the magnetic substrate on older hard disks.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: Corrupted .ods Calc files

Post by Prometheus76 »

RoryOF wrote:Usually corrupt files are due to a system or program crash, or over-hasty power-off of the computer before the files have been fully written to disk - remember that modern hard drives have internal buffering, which requires power a little longer than you think for the data to be writen to disk. Such corruption (not to the extent John_Ha and I are seeing on your files) is sometimes due to improper handling or removal of USB devices, and sometmes by "bit rot", aging of the magnetic substrate on older hard disks.
Not to repeat myself but I never press and hold the power button on my iMac to shut it off... I always go to the Apple menu and click shut down. As I previously stated, all my OO files were on a usb flash drive only so I was reading and writing to that. I may have pulled the flash drive out either while the computer is shutting or after I threw it into the trash to eject it without waiting for its light to stop blinking but the files were already saved... could that still cause problems with data integrity? If so, why wouldn't every file type on the usb drive be inaccessible (?) because they aren't.

Both files were damaged during saving so it can't be something I did. Calc wouldn't save the file (I don't know why) so I just x-ed it out. When I tried to open my files again, I got the message about repairing, which it couldn't do. Today I tried making the ods files into zip files on my pc laptop but to no avail. I also installed the trial version of Kernel for Calc... that was also useless. It said the files were repaired but they still wouldn't open in OO... the repair pop up appeared again and nothing could be done.

What I never mentioned before is that I have auto-save enabled in OO to save my files every 5 minutes as I worked but I was also saving very frequently manually after making little changes as to ensure not losing my work... perhaps there is some conflict with auto-save and manually saving?
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Corrupted .ods Calc files

Post by John_Ha »

Do you want to recover your files?

Complaining may make you feel good but will not recover your files.

Following my last post will.

Your choice.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted .ods Calc files

Post by RoryOF »

We don't drive your computer - we can only give you what advice we think to be helpful - in many cases based on our own experience and that of other users gathered from the Forum. If there was a generic problem with saving OO files - bearing in mind there are in excess of 200 million downloads of OO, and a large number for LibreOffice, which is closely related - there should be many more complaints about corrupted files than there are. Most such complaints are due to some form of user problem. If you feel that does not apply to you, then accept that there are mysteries that mankind is not supposed to understand.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: Corrupted .ods Calc files

Post by Prometheus76 »

John_Ha wrote:Do you want to recover your files?

Complaining may make you feel good but will not recover your files.

Following my last post will.

Your choice.
You seem very angry... if you don't have the patience for tech support, you shouldn't be doing it. I'm telling you the facts as I recall them. You don't have all the answers, no one does. Whatever link you said to use is more Windows related than Mac... no one cares about Mac users. These incidents didn't just happen... it was 3 or 4 weeks ago now. The program and computer have been on and off many times so your solution doesn't apply. Who would've known that you can't turn the computer off if you want to have any chance at recovery. There's nothing in Macintosh HD/Users/(home folder)/Library/Application Support/OpenOffice/4/user in either the backup folder or temp folder now that is of any value. As I stated prior, the main hard drive in my iMac is an ssd and the secondary drive is a regular hdd... even though my files were on a usb flash drive, all the OO temp and backup information was stored on the iMac's ssd. It states recovering from an ssd is very difficult to almost impossible. The free file recovery program for Mac in your solution link doesn't even see the ssd so again, it's useless... plus you need a degree in computer science to know how to use them anyway. Well, now I have in OpenOffice/Preferences/Load+Save/General in the Save section to always create a backup copy and save AutoRecovery information every 1 minutes. We'll see if that will protect me in the future from any new incidents that may occur. Thank you for your time.
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
Prometheus76
Posts: 21
Joined: Fri Oct 12, 2018 10:07 pm

Re: Corrupted .ods Calc files

Post by Prometheus76 »

RoryOF wrote:We don't drive your computer - we can only give you what advice we think to be helpful - in many cases based on our own experience and that of other users gathered from the Forum. If there was a generic problem with saving OO files - bearing in mind there are in excess of 200 million downloads of OO, and a large number for LibreOffice, which is closely related - there should be many more complaints about corrupted files than there are. Most such complaints are due to some form of user problem. If you feel that does not apply to you, then accept that there are mysteries that mankind is not supposed to understand.
What a silly thing to say... just admit you don't know the answer and we can move on. More and more people are viewing my post each and every day so this topic is of great interest to many throwing your theory out the window. I'm sure there are many more people with corrupted files than you can imagine. Just because they all don't post something here about it doesn't mean it's not happening. People react differently to different things. You can't take a poll of just forum visitors and then say I'm the only one with this problem because that's just not reality. Thanks.
OpenOffice 4.1.9 running on Mac OS X 10.13.6 High Sierra
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted .ods Calc files

Post by RoryOF »

I have given you an answer, as has John_Ha, but you have not read our postings with any understanding. You want this to be "Someone else's problem". OK, sort it out yourself - I will offer no further advice.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Corrupted .ods Calc files

Post by John_Ha »

Prometheus76 wrote: I may have pulled the flash drive out either while the computer is shutting or after I threw it into the trash to eject it without waiting for its light to stop blinking but the files were already saved
That is almost certainly your error. The blinking light probably means the file was still being written to the USB stick and had not been saved.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Corrupted .ods Calc files

Post by robleyd »

Well, now I have in OpenOffice/Preferences/Load+Save/General in the Save section to always create a backup copy and save AutoRecovery information every 1 minutes. We'll see if that will protect me in the future from any new incidents that may occur.
The above will give you only one backup, the most recent prior to your last save - see automatic saving in the offline Help. If that is also corrupted, you have no fallback. You might also consider installing the Time stamped backup extension which will allow you to make and keep multiple backups if you use it frequently.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Post Reply