Page 13 of 23

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

PostPosted: Mon Jul 13, 2015 10:42 am
by John_Ha
Chris

Several things. First, you must switch on Show hidden files by Start > Control Panel > (View > Small icons) > Folder options > View. Now tick Show hidden files and un-tick Hide extensions for known files and Hide protected operating system files.

Second, you must be opening a previously saved .odt file. If you have a .odt file with text etc in it, and with two images, you should see 3 files as below. The first is a full .odt file while the others are the graphics images.

If you are opening a previously saved .doc file, then the first file is zero bytes long. The two image files take quite a while to appear, and they disappear and re-appear when you edit the file. If you close the file while they are "gone" you do not lose the images.

It therefore appears that .doc files are stored in memory while being edited; while .odt files are stored on disk as temporary files while being edited.

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

PostPosted: Tue Jul 14, 2015 10:09 am
by Chris Tiberius
John, thanks. I got it now. Though what I don't get, is the temp file is not of the previously saved odt file I opened, it's of another file I previously closed. In other words it's backing up a different file and only that file. No matter which random previously saved odt file I open. Not sure why that is.

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

PostPosted: Tue Jul 14, 2015 12:27 pm
by John_Ha
Chris

There is no concept of "backing up" here. Writer creates a temporary folder every time you open a document to hold its working files.

You have a file Tom.odt. When you open it to edit it, Writer creates a temporary folder abcdeFgh.tmp, and puts a copy of Tom.odt in the folder as a file called abcdeXyz.tmp; and puts each image from Tom.odt in the abcdeFgh.tmp folder as a file abcedPqr.tmp etc, where the first five characters are the same. When you make edits, Writer saves these edits in abcdeXyz.tmp. Incidentally, abcdeFgh.tmp is dated when you last saved it whereas the image files abcdePqr.tmp are dated at the time they were created in the folder.

It you now open Dick.odt as well, Writer creates another temporary folder jklmnOpq.tmp and puts a copy of Dick.odt in it etc.

When you close Writer both these temporary folders and the files inside get deleted.

Several other points

1 If you want to open the temporary files in the folder you cannot because Writer owns them. But you can take a copy of them and paste the copy into the same folder. You can then open the copy :-)

2 If you open Harry.doc, then Harry.doc is not copied into the temporary file - instead a file of zero length appears in the folder. You cannot use this method to recover .doc files - it only works for .odt files.

3 Your folder contents look strange to me. You have an actual .odt file in the folder - I only ever have .tmp files.

4 A correction - I have previously said that "all the files in my temporary folders have the same first five characters as the first five characters of the folder name". This is incorrect - it seems that only the first two characters are the same.

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

PostPosted: Wed Jul 15, 2015 5:53 pm
by agusia
Hello everyone,

I have a corrupted .odt file that I have unsuccessfully tried to recover for a few weeks: I can't seem to get to the content.xml file for some reason. Can anybody help me? It is a chapter of my PhD dissertation, and I have an earlier version but I am quite stressed about what exactly might be in this one, that was supposed to be "final"! :-( Problem is, the file is 227KB, so i don't know how i could attach it so that some of you might have a look, if you have time. Thank you so much for your help!!

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

PostPosted: Wed Jul 15, 2015 9:27 pm
by acknak
Welcome to the community forum!

For tips on posting large or confidential documents, see: [Forum] How to attach a document here

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

PostPosted: Thu Jul 16, 2015 1:23 am
by agusia
Thank you for your answer! Here is a WeTransfer link with my corrupted file:
https://www.wetransfer.com/downloads/3d ... 005/1d5cb7

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

PostPosted: Thu Jul 16, 2015 6:29 am
by John_Ha
Try this which is the odt file unzipped to extract content.xml. There is an error in the html tags somewhere, which would take someone with better skills than me to find, but it should be easy for you to delete all the tags and get back the text.

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

PostPosted: Thu Jul 16, 2015 7:40 am
by acknak
Try this one.
...

 Edit: PS: 
In case someone is wondering, here is the problem: an easy-to-fix problem in content.xml: extra attributes in a style definition:
    <office:automatic-styles>
    <style:style office:name="__Annotation__10737_1353476854111" office:name="__Annotation__5569_679014524111" office:name="__Annotation__12292_187842290111" style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
    <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0.199cm" .../>
    </style:style>
Just delete the office:name attributes (blue)

There is an open report for this problem:
Issue 126219: invalid xml on saving document with comment/annotation
You can register there and add your vote (up to two) or comment.

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

PostPosted: Thu Jul 16, 2015 11:38 am
by agusia
Thank you so much! That's really amazing. The file is perfectly OK. Next time I'll try to be careful in including html tags, if that was the problem...

Thank you for helping people in distress ;), best to all!

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

PostPosted: Thu Jul 16, 2015 2:07 pm
by RoryOF
Next time, make a backup of any existing file before you start an editing session. It is worth making backups in course of the edit.

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

PostPosted: Wed Aug 12, 2015 4:25 pm
by duhktape
Hey Everyone!

I am new to the boards, and I thought this topic would help, but it seems I'm running in to some problems beyond my skill level.

I have a fairly large, multi page .ods spreadsheet, and last I looked at it it was fine. Yesterday morning, I go to open it, and AOO wants to import the text data and it just gives me a blank sheet. I've tried unzipping the file to edit some of the XML, but I can't seem to get past even unzipping the file! Any help would be much appreciated!

https://drive.google.com/file/d/0B46244 ... sp=sharing - There is my file.

Thanks again!

Zack

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

PostPosted: Wed Aug 12, 2015 7:17 pm
by RoryOF
An ASCII filter message usually means that OpenOffice cannot understand the file; this suggests it is damaged, as also does the inability of an archive utility to open it. With more powerful archive tools and experience than I have something may be recovered by someone else, but don't hold your breath!

You should look in the backup and temporary directories pointed to by /Tools /Options /OpenOffice : Paths. Rename any files in those to the correct type and see if they contain your data. Run an undelete utility such as Recuva or PhotoRec and see if it will find some deleted temporary file holding some or all of your data.

It is possible that your file was corrupted by over-hasty shut down of the computer at the end of your editing session. OpenOffice files are complex so take a little longer to write than one might expect. It is best to close the file, then close OpenOffice and after some few seconds close the operating system down before powering off.

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

PostPosted: Wed Aug 12, 2015 10:30 pm
by acknak
duhktape wrote:...
I have a fairly large, multi page .ods spreadsheet, and last I looked at it it was fine. Yesterday morning, I go to open it, and AOO wants to import the text data and it just gives me a blank sheet. ...

So sorry, the file is all zeroes. No recoverable data there.

Hope you have a backup copy. If not, sometimes OO will leave a copy in a temp file.

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

PostPosted: Wed Aug 12, 2015 10:37 pm
by duhktape
What a bummer! Thanks for your input, either way!

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

PostPosted: Fri Aug 21, 2015 12:22 pm
by timenk
I have this corrupt odt that contains a speech my girlfriend worked very hard on. Could you probably have a look to see if something is still there? It would be such a big help!

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

PostPosted: Fri Aug 21, 2015 12:29 pm
by RoryOF
I got nothing from it. Perhaps someone else might when they come online.

If you have access to he originating machine try the Backup folder for a .bak file. Look in OpenOffice's Temporary documents folder and rename any files to type .odt (or ,doc, as appropriate). See if they will open. If no luck, run a recovery utility (Recuva or PhotoRec) and see if it finds a deleted temporary file.

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

PostPosted: Fri Aug 21, 2015 1:30 pm
by acknak
Sorry, it's all zeroes. No recoverable content.

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

PostPosted: Mon Aug 24, 2015 11:23 am
by John_Ha
If you are lucky, you might be able to un-delete some of the temporary files which Writer wrote while you were editing the .odt file, and then deleted when you closed Writer. Act quickly - they risk being overwritten the longer you leave it. Note that this only works if you were editing a .odt file - it does not work if you were editing a .doc file.

Using RECUVA to un-delete Writer temporary files which are now deleted

Another on RECUVA

These may also be helpful.

Using 7-ZIP

Inside an odt file

Hints on how to prevent it happening

Always set AutoRecovery to save a copy of the file every few minutes while you are working on it - it protects you against things like power cuts, OS freezes etc. Tools > Options > Load/Save > General ...

Always?? set Create a backup copy to ON - this keeps the previously saved version of the file fred.odt as fred.bak in the Backup folder. Tools > Options > Load/Save > General ... The Backup folder location is shown by Tools > Options > OpenOffice > Paths ... You may need to switch on Show hidden files (Control Panel > Folder Options > View ...) to be able to see the folder and its contents. Why the ??? Because you should remember that highly_personal.bak will still be in the Backup folder long after you have deleted highly_personal.odt!!!

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

PostPosted: Tue Sep 29, 2015 3:04 pm
by Sabsi-me
Hi acknak, you had me ever helped two years ago. I found another corrupt ODT file that I previously could not repair. The text is incomplete, missing many pages. Can I send you the file so that you look at this? Sorry, I know, my english isn't so good, hope, you understand me.

The file is a bit older and I had them stored on CD, and found that it is (wanted with Recuva) both on CD and on the hard disk is damaged. Zip programs show error messages to. I have tried a lot to repair the file (Recovery for Writer, File Repair, Recuva, Zip-Programs ...) and now do not know what I should do.

The file is very personal, so I do not want to post them in the forum.

I need Help. :(

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

PostPosted: Tue Sep 29, 2015 6:09 pm
by acknak
No promises of course but I'd be glad to take a look at it. Click the email button to the right of this post and I'll reply with an email you can send the file to.

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

PostPosted: Mon Oct 05, 2015 7:57 pm
by kinkes
Hi, i have a corrupted .odp file which i've tried hours to get its xml file work with the instructions this topic provide but every time i delete the replicated line open office give me same error with different lines. So i've failed solving problem. Your need is needed and much appreciated.

http://www.megafileupload.com/qewK/EMZ% ... 0_SUNU.odp

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

PostPosted: Tue Oct 06, 2015 4:30 am
by acknak
Try this one:
EMZİRMENİN ÖNEMİ SUNU_recovered.odp

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

PostPosted: Tue Oct 06, 2015 7:40 am
by kinkes
acknak wrote:Try this one:
EMZİRMENİN ÖNEMİ SUNU_recovered.odp


Sir your help saved me hours of working, you're amazing, thank you very much.

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

PostPosted: Tue Oct 06, 2015 3:12 pm
by acknak
Glad it worked for you. It turned out to be an easy problem to fix.

There were ten instances of the same problem: the same attribute defined twice:
draw:mirror-horizontal="false" ... draw:mirror-horizontal="true"

I used a simple find/replace to remove all ten instances of the extra attribute:
draw:mirror-horizontal="true"

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

PostPosted: Wed Oct 07, 2015 6:11 pm
by kinkes
acknak wrote:Glad it worked for you. It turned out to be an easy problem to fix.

There were ten instances of the same problem: the same attribute defined twice:
draw:mirror-horizontal="false" ... draw:mirror-horizontal="true"

I used a simple find/replace to remove all ten instances of the extra attribute:
draw:mirror-horizontal="true"


It worked beatifully. I deleted both of them "draw:mirror-horizontal="false" ... draw:mirror-horizontal="true"" seven or eight times but i couldn't get it worked. So i did wrong by deleting them both. Thanks for additional info.

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

PostPosted: Sat Oct 17, 2015 6:29 pm
by omzense
I believe Moderator Acknak & Heleste have helped several people recover corrupted OpenOffice Writer .ODT files (even after those who failed recovering it via the zip/unzip/content.xml route), if you post the file via Mediafire & the link, to this forum.
My own personal file is a year's work of a spiritual journal, (of which I have no copy backups), and some 300 pages (600kb) and the mediafire link is attached.
I have tried (and failed) the various suggestions on this thread to fix the file and now request the power-user (gods) for their help!
I hope someone here can help me recover atleast part of this file.

Thanks

Mediafire link to document: https://www.mediafire.com/folder/8ecv1l ... /Documents

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

PostPosted: Sat Oct 17, 2015 8:06 pm
by John_Ha
I am very sorry, but there is nothing in your ref2.odt file - it is full of nulls. You can see this by opening it with a text editor like Notepad or, better and much faster, with Notepad++.

If you are lucky, you might be able to un-delete some of the temporary files which Writer wrote while you were editing the .odt file, and then deleted when you closed Writer. Act quickly - they risk being overwritten the longer you leave it. Note that this only works if you were editing a .odt file - it does not work if you were editing a .doc file.

Using RECUVA to un-delete Writer .odt temporary files which are now deleted

Another on RECUVA

These may also be helpful.

Using 7-ZIP

Inside an odt file

Hints on how to prevent it happening

Always set AutoRecovery to save a copy of the file every few minutes while you are working on it - it protects you against things like power cuts, OS freezes etc. Tools > Options > Load/Save > General ...

Always?? set Create a backup copy to ON - this keeps the previously saved version of the file fred.odt as fred.bak in the Backup folder. Tools > Options > Load/Save > General ... The Backup folder location is shown by Tools > Options > OpenOffice > Paths ... You may need to switch on Show hidden files (Control Panel > Folder Options > View ...) to be able to see the folder and its contents. Why the ??? Because you should remember that highly_personal.bak will still be in the Backup folder long after you have deleted highly_personal.odt!!!

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

PostPosted: Sat Oct 17, 2015 8:13 pm
by RoryOF
I confirm: I got nothing from it.

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

PostPosted: Sat Oct 17, 2015 11:31 pm
by omzense
Thank you John-Ha and RoryOF for your swift responses and attempts.......I guess its back to the drawing board....& you betcha I will save it this time to every other drive and the clouds and heavens too....!...thanks

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

PostPosted: Sun Oct 18, 2015 11:04 am
by John_Ha
Try to recover some of the temporary files - I have done so successfully in the past.