[Hint] How did I fix my ODT file

Discuss the word processor
Post Reply
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Hint] How did I fix my ODT file

Post by acknak »

Try this one.
I am switching to xls format as advised to me by my superiors.
Make sure the decision is not blamed on you because this will almost surely make the situation worse.

My guess, based on the nature of the corruption, is that you have some sort of hardware problem; flaky memory, maybe? I would be absolutely sure that the hardware is working correctly before I tried something else. Try a different computer, perhaps?
Attachments
HD [Daily Report] 15 December 2012 - Pernites, Marussel A._recovered.ods
(130.29 KiB) Downloaded 6448 times
AOO4/LO5 • Linux • Fedora 23
mathkor89
Posts: 1
Joined: Sun Jan 20, 2013 4:14 am

Re: [Hint] How did I fix my ODT file

Post by mathkor89 »

hey @acknak Im not using openoffice (ibreoffice, that's what I get for trying to go legit )and the chances of hearing a reply from you in an hour is nigh, but from what I saw your a magician at recovering files. I cant seen to open a files that I saved as a docx for a final paper, can you help me ? it wont recover not in word pad, word office or libreoffice. need that paper to work on my other paper (to fill in the gaps ) due in less than 6 and a half hours :crazy:.
and yes I kinda deserve it for procrastinating that long, but if theres a will there's a way
OpenOffice 3.1 windows 8
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Hint] How did I fix my ODT file

Post by Hagar Delest »

ODF is much easier to recover since it's human readable. For docx, it's less that easy. You can upload it somewhere so that we have a look but that's rather late now I guess.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Hint] How did I fix my ODT file

Post by acknak »

As one procrastinator to another, I feel your pain ;-)

I'd be interested to take a look at the file, just out of curiosity, even if it's past the deadline. Email me or upload & post a link, or just attach it here (you may have to change ".docx" to ".zip") if it's less than 128k.
AOO4/LO5 • Linux • Fedora 23
momix76
Posts: 2
Joined: Mon Feb 18, 2013 7:14 pm

Re: [Hint] How did I fix my ODT file

Post by momix76 »

i am still stuck guys... i am doing my best to catch up with everything (i didn't even know notepad ++ existed).thanks to IT forums I've managed in the past to learn so many things, from deactivating nasty viruses like the fake police one to cleaning my register! this time though is so hard to get this. i don't know how to get an xml file starting from my friend's ordinary (corrupted) odt file. i beg anybody to give me a hint. thank you from the bottom of my heart.
Open Office 3, running on Windows 8
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Hint] How did I fix my ODT file

Post by Hagar Delest »

An ODF file (.odt for text files) can be opened with an archive manager: make a copy of the file and rename it to .zip (note that 7zip can open it right away with right click. Then you'll see the content.xml file.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
momix76
Posts: 2
Joined: Mon Feb 18, 2013 7:14 pm

Re: [Hint] How did I fix my ODT file

Post by momix76 »

Hello Hagar, thank you for taking time to answer me. I had already renamed the file as a zip and tried to open it with 7zip, but 1) it says it's not an archive and cannot open it - the right click option doesn't come up btw, and 2) is there a specific hidden menu in 7zip that allows you to find xml content? I looked up in their help file but the only thing under "xml" is their "Thanks" page :)
Open Office 3, running on Windows 8
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Hint] How did I fix my ODT file

Post by RoryOF »

If 7zip doesn't recognise it as an archive then the archive is damaged, possibly beyond repair. Some archive managers will attempt to repair an archive (Google for "repair zip" to find one), but I think you will have to reconcile yourself to severe or total data loss.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Hint] How did I fix my ODT file

Post by Hagar Delest »

In some case, we can recover a damaged ODF file even if the zip fails. But you need to upload it somewhere like mediafire.com if bigger than 128kB or here (see How to attach a document here).
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
_adriano.
Posts: 2
Joined: Tue Feb 26, 2013 1:53 am

Re: [Hint] How did I fix my ODT file

Post by _adriano. »

Hello.
I'm having trouble with a odt. file. It's an important workpaper and, even though I tried to follow the steps that have been posted here, I haven't been able to open it. I wonder if anyone could take a look. It has only 49 kb and it seems to have a problem in the middle section, because the text appears only up to this point.
When I tried to extract the file with WinRAR, I got a CRC error, so I would like to know if there's nothing that can be done.

I appreciate very much the help!
Attachments
0121-25.11-028 --.odt
(48.6 KiB) Downloaded 6226 times
OpenOffice 3.1 on Windows 7
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Hint] How did I fix my ODT file

Post by Hagar Delest »

Adriano,

Here is what I've recovered. Sorry to have been a bit long, I had forgotten about your post...
The end of the file is really messy. There may be some additional text to be recovered but it will need some work.
I've opened the file with Emacs and then cut the part that is messy. I completed the missing tags, et voilà.
0121-25.11-028 --.odt
(25.24 KiB) Downloaded 6325 times
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
_adriano.
Posts: 2
Joined: Tue Feb 26, 2013 1:53 am

Re: [Hint] How did I fix my ODT file

Post by _adriano. »

Thank you very much! That's way more than I ever expected to get recovered. At least, I don't have to restart from zero and that's about 80% of what I had before. Again, thank you so much!
OpenOffice 3.1 on Windows 7
benja
Posts: 2
Joined: Wed May 01, 2013 10:38 am

Re: [Hint] How did I fix my ODT file

Post by benja »

Hi all,
I'm in a similar sitation, a 16 page odt document I worked on won't open, I get a "format error discovered in the file in the sub-document content.xml at 2,128141(row,col).
The document is in Japanese and French, I really need to recover it somehow, at least partially, as a lot of work went in to this...
can anyone help out? I tried working on the .xml file could find out how to do it.

http://depositfiles.com/files/nlpn9wewp
Thanks in advance
mac os 10.6.8
neooffice 3.2.1
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Hint] How did I fix my ODT file

Post by acknak »

benja wrote:... can anyone help out? I tried working on the .xml file could find out how to do it. ...
Try this one.

The problem with the xml seems to be in one particular ruby text. Since I don't have the slightest idea how this is supposed to work, I just removed all the ruby-text xml from the problem area, preserving any text there as normal text. So the text content should still be there, but you'll have to re-create the ruby text and re-format those lines. Look for "@@@@@" marking the problem text.
Attachments
structure S6 copy_recovered.odt
(103.92 KiB) Downloaded 6219 times
AOO4/LO5 • Linux • Fedora 23
benja
Posts: 2
Joined: Wed May 01, 2013 10:38 am

Re: [Hint] How did I fix my ODT file

Post by benja »

fantastic!
yes, I put some ruby text in there, but it was really secondary info, and thanks to you I got pretty much everything back. A few sentences with that had ruby text are gone, but it's no biggie.
What software did you use to edit? I've had this issue once before with a japanese + ruby text file, but had given up on recovering it. As I'm currently under mac OS I tried an app called "text wrangler" to try and edit, but it couldn't open the odt file. If need be I also have a ubuntu running computer.

thanks again for your help

ben
mac os 10.6.8
neooffice 3.2.1
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Hint] How did I fix my ODT file

Post by acknak »

Pretty much any text editor should work. You just have to unzip the odt file and extract the sub-file with the problem, then edit that with the text editor and update the document file zip archive. By default, the xml sub-files are stored without any line breaks, so you need an editor that can handle very long lines, or you can use a dedicated xml editor. I prefer the text editor because it doesn't matter if the xml has problems.
AOO4/LO5 • Linux • Fedora 23
KhaaL
Posts: 7
Joined: Tue May 05, 2009 10:33 pm

Re: [Hint] How did I fix my ODT file

Post by KhaaL »

Greetings! I have also got a "read-error. Error reading file." when trying to open my odt file in libreoffice 4.0.0.3 (which is exactly what I used when I saved the file). The file opens fine in MS wordpad but if I save it as a odt from wordpad, all the custom formatting I've made will be gone (as will the language markings for spellchecking). I downloaded openoffice to try and open that very same odt file and it managed to do so well, with the correct formatting, headings, image placement, zotero cross-references and so on. using open office to re-save the file in odt format allowed me to open it again in libreoffice.

This was a life saver, considering my document to be 80 pages long and losing that work would be traumatic to me, to say the least.
OOo 3.0.X on Ubuntu 8.x
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Hint] How did I fix my ODT file

Post by RoryOF »

If your work is important, you should have a policy of regular backup in place. That way you will only loose the last editing session if there is a catastrophe.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
KhaaL
Posts: 7
Joined: Tue May 05, 2009 10:33 pm

Re: [Hint] How did I fix my ODT file

Post by KhaaL »

I do backups and save with new filenames with increasing numbers regularly, still that didn't prevent the last three files from being corrupted - with no warning what so ever at the save process.
OOo 3.0.X on Ubuntu 8.x
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Hint] How did I fix my ODT file

Post by RoryOF »

The corruption at save time can occur because of over speedy close down of the computer. By nature of its files OpenOffice seems to take longer than other applications - not very much longer, but just a little.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
KhaaL
Posts: 7
Joined: Tue May 05, 2009 10:33 pm

Re: [Hint] How did I fix my ODT file

Post by KhaaL »

OK, there seem to be a misunderstanding here. I'm not really intrested in general explanations on why the corruption occured. No offence, but your explanation does not contribute much since I'm talking about *libreoffice* and the software is installed on a SSD with a i7 CPU - far enough to give it time to save properly.

I'm stating that this is unacceptable and had I not taken precaution to save my work over several files, I'd be in a seriously bad situation. Luckily, it was amended by using openoffice to re-save it and restore it to a state that libreoffice could read. Hopefully, if someone gets in the same situation as me, they can solve it through that as it was a hassle trying to restore the xml file manually.
OOo 3.0.X on Ubuntu 8.x
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: [Hint] How did I fix my ODT file

Post by jrkrideau »

I think you are misunderstanding the unzip procedure. An odt file really is just a zip file under another name. What you want to do is go to the file in whatever folder it is in, right-click on it and choose Rename. Then change the odt to zip and proceed from there.
LibreOffice 7.3.7. 2; Ubuntu 22.04
DeeptiGarg
Posts: 1
Joined: Fri Jun 21, 2013 6:50 am

Re: [Hint] How did I fix my ODT file

Post by DeeptiGarg »

acknak wrote:Very odd corruption in this one, although not too bad to fix.

Check (and fix) the formula in Daily.X182; I had to guess at what the formula should be. To mark the cell, I intentionally modified the function name to _sum. You should check the formula and fix the name once the formula is correct.

Any recovered file could have other problems: check it all over very carefully before you use it.
Dear Acknak,

As you solved the precious problem, Please solve my same problem also. i also can not open my open office file which is corrupted there is very important data of whole month please help me.
Attachments
Daily_Activity_Task June 2013 .xls
Please try to open any one sheet. it will very grateful for me and i am very thankful to you.
(1.5 KiB) Downloaded 6346 times
Daily_Activity_Task June 2013.ods
(1.5 KiB) Downloaded 6039 times
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4 on Ubuntu 9.04
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Hint] How did I fix my ODT file

Post by acknak »

DeeptiGarg wrote:... i also can not open my open office file which is corrupted ...
Sorry, nothing there to recover: the files are damaged and contain no useful data. The data in both files is exactly the same.
AOO4/LO5 • Linux • Fedora 23
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Hint] How did I fix my ODT file

Post by RoryOF »

That's what I got also, acknak. As soon as I saw the file size I was certain of that, as an empty .odf file is about 6.5kB.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
nightwinter
Posts: 7
Joined: Wed Jul 03, 2013 9:54 am

Re: [Hint] How did I fix my ODT file

Post by nightwinter »

Dear Acknak,

I have problem with the content.xml file, think the file is corrupted. But when I try to open it using Komodo Edit, it says "Buffer contains null byte(s)". The complete link is in this topic : http://forum.openoffice.org/en/forum/vi ... =9&t=62646

Can this be recovered? Many thanks before..
OpenOffice.org 2.0.2
Sabsi
Posts: 4
Joined: Fri Sep 27, 2013 8:22 pm

Re: [Hint] How did I fix my ODT file

Post by Sabsi »

Hi,

I have the following problem: I can odt. not open because it is defective, and on the question of whether OpenOffice Writer will try to fix it, only appears a completely white page when I confirm. I have already tried all the recovery / repair tools, packaged as a zip file, unpacked and can also save a part of the more than 1,000 pages long text, but it is packed with commands, formatting completely over and the file is not complete, it lacks a portion of the text and the rest is repeating and ending abrupt

The zip programs show error messages (such as file header damage) other tools tell me that no useful data were found, and I have already tried test editors and browsers; emerged in the latter - depending on how I had named the ending - either above history or described should be noted that a processing error has occurred, no element is present ... etc.pp ... as it is in the file is a very personal concerns, which I will not give into the hands of third parties, I am at my wits end, is there anyone here who knows the described problem and possibly a solution? Can I send someone the file by mail for review?

I'm from Germany and my English is not so good. So I hope that you understand me.

greeting
Sabsi
OpenOffice 4 on Windows 7
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Hint] How did I fix my ODT file

Post by acknak »

Sabsi wrote:... Can I send someone the file by mail for review? ...
I can't make any guarantee of recovering anything but it's no problem to take a look at the file. Just click the email button, over there ---->

I''ll reply with an address you can send your file as an attachment.
AOO4/LO5 • Linux • Fedora 23
User avatar
yoramdavid
Posts: 7
Joined: Sun Oct 06, 2013 12:54 am

Re: [Hint] How did I fix my ODT file

Post by yoramdavid »

Hi,

This is an old threat but still active!
I am having the same problem, with an error on the Content.xml of an .ods file, line 2 column 66xxxx....

I tried both xmllint and XML Copy Editor and got errors, but do not know how to fix them.
XML Copy Editor tells me there is a duplicate attribute but I do not find it.

Would anyone be kind enough to help me with the XML Copy Editor?
Or perhaps it is easier to upload it?
I would be very grateful.

Thanks, yoram
content.zip
I had to change the extension from .xml to .zip for the site to accept it.
(67.96 KiB) Downloaded 6341 times
LinuxMint 14.0 Nadia with LibreOffice 4.0.4
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Hint] How did I fix my ODT file

Post by acknak »

yoramdavid wrote:... I tried both xmllint and XML Copy Editor and got errors, but do not know how to fix them.
XML Copy Editor tells me there is a duplicate attribute but I do not find it. ...
Here are the two elements that have errors reported by xmllint:
  • <table:table-row
      table:end-cell-address="Peugeot.Q60" table:end-x="0.418cm" table:end-y="0.839cm" draw:z-index="13"
      table:end-cell-address="Peugeot.Q60" table:end-x="0.736cm" table:end-y="0.839cm" draw:z-index="14"
      table:style-name="ro1" table:number-rows-repeated="4">
    
    <table:table-row
      table:end-cell-address="Peugeot.Q67" table:end-x="0.39cm" table:end-y="0.022cm" draw:z-index="16"
      table:end-cell-address="Peugeot.Q67" table:end-x="0.71cm" table:end-y="0.022cm" draw:z-index="17"
      table:style-name="ro1" table:number-rows-repeated="1048509">
You can see there that each element has several attributes repeated--this is an error, by definition.

The error can be resolved by removing the repeated attribute definitions so that each element has only one definition for any particular attribute.

Simple enough, but which ones should be removed?

In some cases, it obviously doesn't matter because both definitions are identical; just take one--either one--out. The one remaining will then be unique--no duplicates.

In the cases where the attributes are defined twice, each time with different values, your guess is as good as mine as to which is the one to remove. I generally remove the first one, under the theory that the second one is later and therefore correct. That's just a theory; I have no idea if it's correct but it at least allows the file to load.

The patched-up elements, then, look like this:
  • <table:table-row
      table:end-cell-address="Peugeot.Q60" table:end-x="0.736cm" table:end-y="0.839cm" draw:z-index="14"
      table:style-name="ro1" table:number-rows-repeated="4">
    
    <table:table-row
      table:end-cell-address="Peugeot.Q67" table:end-x="0.71cm" table:end-y="0.022cm" draw:z-index="17"
      table:style-name="ro1" table:number-rows-repeated="1048509">
AOO4/LO5 • Linux • Fedora 23
Post Reply