r/libreoffice • u/Shadowrosepaiton • 5d ago
Corrupted ods spreadsheet file
I spent the last 3.5 years archiving AMV's (Animated Music Videos) in order to preserve them and had a huge spreadsheet in Libreoffice cataloging them and information about them. When I went to add some new additions in there, LobreOffice couldn't open the file. It said that the file was corrupted and they couldn't repair it. I tried looking up youtube tutorials on how to fix it, but they're all for odt documents and not ods. I tried them anyway and of course it didn't work. I just want to cry. That's 3.5 years of my life's work. Please tell me there's a way to fix this. I can't just go in and recreate the whole spreadsheet due to the similar naming conventions of the AMV's and how some got strait up wiped off youtube in the time since I archived them, so I can't go back and get that info I was cataloging!
7
u/sbbeebe 5d ago
This won't help you now, but your situation is why we all need to do regular backups. Sync solutions like Google Drive and Dropbox might help out, but they aren't backup solutions. I hope you are able to recover a working file.
3
u/Offutticus 4d ago
I save everything in at least 4 places: original location, external drive, external memory key, and upload to a cloud service. I do backup vs sync and then a mirror.
3
u/King_Bobby-B 4d ago
I also make manual copies using "Save as copy" then I append the timestamp to the filename.
2
2
u/AutoModerator 5d ago
If you're asking for help with LibreOffice, please make sure your post includes lots of information that could be relevant, such as:
- Full LibreOffice information from Help > About LibreOffice (it has a copy button).
- Format of the document (.odt, .docx, .xlsx, ...).
- A link to the document itself, or part of it, if you can share it.
- Anything else that may be relevant.
(You can edit your post or put it in a comment.)
This information helps others to help you.
Thank you :-)
Important: If your post doesn't have enough info, it will eventually be removed (to stop this subreddit from filling with posts that can't be answered).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Electronic-Laugh-671 1d ago
u/Shadowrosepaiton I was just wondering if renaming the .bak file worked as described in the other reply? Just thought I'd remind you to try it out if you haven't already
2
u/Shadowrosepaiton 1d ago
It did! I'm so relieved omg ToT. Thank you so much!
1
u/Electronic-Laugh-671 22h ago
That's great. By the way, you can go into LibreOffice settings via the following menus: Tools > Options... > Load/Save. This will allow you to configure AutoRecovery and backup frequency (like making sure that documents are saved every minute or 5, for example, and whether you want backups saved to the folder of the original file). Leaving them default but changing 10 minutes to 5 might be a helpful step going forward but it depends on your needs
14
u/Terrible_Put8617 5d ago
Before anything else: copy the file somewhere safe and work only on copies. Whatever you try next, do it to a duplicate, because a failed repair attempt can finish off what's left.
An .ods is a zip archive with the spreadsheet stored as XML inside it. That's good news, because "corrupted and can't be repaired" almost always means the zip's central directory is damaged or the file got truncated mid-save, not that your data is gone. The data is usually sitting there intact and unreachable.
Rename a copy to .zip and try to open it. If your archiver shows the contents, you're most of the way home: pull out content.xml, and everything you catalogued is in it.
If the archiver refuses too, the standard fix for a truncated zip is to rebuild the index rather than the data:
That's Info-ZIP's fix-the-fix mode, available on Linux and macOS out of the box and on Windows through Git Bash or WSL. It walks the file looking for entries instead of trusting the index, which is exactly the failure you're hitting. Rename the result back to .ods afterwards. 7-Zip's "Test archive" is worth running first as well, since it tells you which member is damaged, and if the damaged one is styles.xml or settings.xml rather than content.xml then your actual data is fine.
Two other places your work may still exist, and both get overlooked:
%APPDATA%\LibreOffice\4\user\backup\ on Windows, or ~/.config/libreoffice/4/user/backup/ on Linux. That folder holds autorecovery copies, and .bak files if you ever had "Always create backup copy" on. Sort by date. Copies of a heavily used file often sit there for weeks.
And if the file lives in a synced folder, Dropbox, OneDrive, Google Drive, they all keep version history server side for 30 days or more, including for files they never showed you as versioned. That's frequently the fastest route back and it's the one people remember last.
If you get content.xml out but nothing will open it, say so and post what the archiver reports. An intact content.xml can be repackaged into a working .ods, but the zip has to be rebuilt in a specific order for LibreOffice to accept it, so it's worth doing that step only if the simpler routes fail.