[Hint] How did I fix my ODT file

Discuss the word processor

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

Postby SzunyogVihar » Fri Apr 08, 2016 9:38 pm

Dear acknak,
Thanks a lot for your efforts.

The file was created both with MS Office and Open Office and saved in both doc and odt and changed back and forth, I guess this may have caused a lot of errors in the xml.
I have tried to correct the indicated errors in the content.xml file but it just kept showing more and more errors. After about an hour or two of correcting them I gave up as it seemed to be an endless story.

Thanks again for solving the problem.
Do you have any idea on how I may change the file to ensure it remains uncorrupted? Now it is difficult to format, even a simple font change seems to be a "mission impossible".

Best,
Sz.V.

PS: Is there a way to remove (hide) the recovered file as it has a lot of data not ready to publish? Thanks a lot.
Libre Office 4.2
??ubuntu 14.04 LTS
SzunyogVihar
 
Posts: 6
Joined: Thu Apr 07, 2016 7:23 pm

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

Postby acknak » Fri Apr 08, 2016 11:25 pm

Sorry, I've no special suggestions. Documents have always been very stable for me; I can't think what might be causing the trouble.

In general, I find that writing & editing go smoother when I avoid direct formatting and stick to styles as far as possible.
AOO4/LO5 • Linux • Fedora 23
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

Postby RoryOF » Sat Apr 09, 2016 8:54 am

I suggest that any complex file should not be edited on different platforms and in different formats. If your MS Word will edit in .odt stick with that format. Better again to edit only on Ms Word or OpenOffice (my preference is for OO) and not be switching from one to the other. It may be that if future corruption occurs the file might not be recoverable.
Apache OpenOffice 4.1.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29560
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Extracting text from content.xml

Postby John_Ha » Sat Apr 09, 2016 9:01 am

It may be easiest for you to get the unformatted text out of the content.xml file and then reformat it.

1 Unzip the .odt file, or rename the xxx.odt file to xxx.zip and double click it
2 Drag content.xml onto the desktop
3 Download and install Notepad ++ and the XML plugin
4 Open content.xml with Notepad ++ and go Plugins > XML Tools > Pretty Print (XML with line breaks). The original file only has two lines in it, where the second line is very long. This puts in linebreaks and each line is now short so the file is readable.
5 Save the file as a .TXT file.

Now delete all the tags and you are left with just the text.

If you copy all the text into Writer, you can use Find and Replace with regular expressions to search for and delete everything between " < " and " > ", including the " < " and the " > " which will remove the vast majority of the tags.

Put (<)(.*)(>) in the Find box. Leave the Replace box empty. Tick Regular expressions. Click Replace All. The expression looks for <, then all the text until it finds >, and then >. It then replaces everything it has found with nothing - ie it deletes it.

Instead of Step 3 and 4, Google for a pretty print web site where you can upload content.xml and the website with create a pretty print output.

 Edit: Having just tested it, it may be easier to ignore Steps 3 and 4 above. Instead

Step 3 Open content.xml with Windows Notepad or the Ubuntu equivalent. Edit > Select All, Edit > Copy
Step 4 Paste into an empty Writer document.

When you do the Find and Replace, you don't have to delete lots of empty paragraphs. 
Last edited by John_Ha on Tue Apr 12, 2016 7:12 pm, edited 1 time in total.
AOO 4.1.6, Windows 7 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.
John_Ha
Volunteer
 
Posts: 6800
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby SzunyogVihar » Sat Apr 09, 2016 11:24 am

Thanks a lot to everyone for all the ideas and suggestions.
This time a recovery helped (thx to acknak), but for later I have learned the lesson.

Thanks again and have a great weekend.
Libre Office 4.2
??ubuntu 14.04 LTS
SzunyogVihar
 
Posts: 6
Joined: Thu Apr 07, 2016 7:23 pm

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

Postby MMcKay » Tue May 10, 2016 7:44 pm

Ok - Im' another person with this same issue.

Document was working fine (just a plan text document in ODT format), saved it when I was ready to close - no issues. Then tried to open it again and I'm getting the corrupt file notice. Can't be open in any other program thus far.

Please, please can someone help me? I am not at all computer literate and this is a chapter of my PhD so would love to not have to rewrite all of the edits I made since the last version I can open.

It's saying the file is too big to attach:(
LibreOffice 4.3.6.2
MMcKay
 
Posts: 2
Joined: Tue May 10, 2016 7:24 pm

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

Postby MMcKay » Tue May 10, 2016 8:18 pm

Hello, Folks -

I'm having a similar problem with a .odt file. It's been going back and forth between my supervisor and I and he is using word. I have tried to work out the system myself but I don't know anything about code really and I'm just not able to figure it out.

Anyone willing to help?
LibreOffice 4.3.6.2
MMcKay
 
Posts: 2
Joined: Tue May 10, 2016 7:24 pm

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

Postby acknak » Tue May 10, 2016 11:34 pm

I'd be happy to take a look; use the email button at the right and I'll respond with an address you can send it to.

Just be aware: if your document opens but shows nothing but #### ... then there's no hope for it: it's nothing but zeroes.

If you get the text import dialog, there's only a slim hope. Such documents are usually badly damaged.

If you get the "... error in sub-document ..." message, then the outlook is a little brighter, but still no guarantees.

 Edit: PS: 
And there's nothing I can do with a .doc-format file. ODF (.odt) is the only format amenable to manual fixing.
AOO4/LO5 • Linux • Fedora 23
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

Postby acknak » Wed May 11, 2016 2:14 pm

Follow-up on the last report: this turned out to be another instance of the "text span comment" problem, where extra/duplicate "office:name" attributes are present. Removing those extra attributes solved the problem.
AOO4/LO5 • Linux • Fedora 23
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

Postby RoryOF » Wed May 11, 2016 2:33 pm

I've repaired a few of these, acknak, but I didn't note them, so there may be more than we realise.
Apache OpenOffice 4.1.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29560
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby BrianHoef » Mon May 30, 2016 2:20 am

Hello! I'm afraid I'm in the same boat here. I've tried the .zip solutions, but I just end up in an endless cycle of changing a .zip file into a .cpgz file and back; none of the files open, and I never get a folder with any kind of xml information in it. Is this a Mac thing? Is there a particular program I should be using other than the default archive utility? Like everybody else on this thread, I'm unable to access a pretty important document.

Thanks!
Brian
OpenOffice 4.1.2
Mac OS 10 El Capitan
Version 10.11.4
BrianHoef
 
Posts: 3
Joined: Mon May 30, 2016 2:02 am

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

Postby RoryOF » Mon May 30, 2016 6:49 am

An OpenOffice file in its native format (.odt, ods .odp etc) should open using an archive manager into a collection of folders and .xml files. It can happen that the archive manager will say that it doesn't know how to open such a file type, in which case one should rename it to .zip and try again. .zip format is probably the most common (and longest established?) archive format, so if the installed system archive utility doesn't open the renamed file then that may be damaged beyond any hope of repair.

Usually OO files are damaged because of improper (often over-hasty) shutdown of the computer, before the internal housekeeping is complete. It is best to close down the computer using the correct shutdown procedure and wait a few seconds for all disk activity to cease before powering off.
Apache OpenOffice 4.1.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29560
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby BrianHoef » Mon May 30, 2016 3:56 pm

Thanks for the answer! Unfortunately, when I try to open the .odt file with the archive utility, it turns it into a .odt.cpgz file; and when I try to open the .zip file with it, it turns it into a .zip.cpgz file. No idea how to break this loop. Any recommendations?

Good to know how they form in the first place - I'll be especially careful of that in the future.
OpenOffice 4.1.2
Mac OS 10 El Capitan
Version 10.11.4
BrianHoef
 
Posts: 3
Joined: Mon May 30, 2016 2:02 am

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

Postby keme » Tue May 31, 2016 8:10 am

BrianHoef wrote:Thanks for the answer! Unfortunately, when I try to open the .odt file with the archive utility, it turns it into a .odt.cpgz file; and when I try to open the .zip file with it, it turns it into a .zip.cpgz file. No idea how to break this loop. Any recommendations?

Unusual, but not unheard of. There may be hidden info in the file system or settings for the archive utility, governing the handling of your files. See this forum thread in the Apple support community:
https://discussions.apple.com/thread/65 ... 0&tstart=0
The links in the answer from Kappy may be useful.
Apache OO 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 3256
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

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

Postby John_Ha » Tue May 31, 2016 8:44 am

BrianHoef wrote:... when I try to open the .odt file with the archive utility, it turns it into a .odt.cpgz file; and when I try to open the .zip file with it, it turns it into a .zip.cpgz file

You can easily check to see if the .odt file is a zip file by opening it with Notepad or Notepad++ or similar editor. If it is a ZIP file, the first two characters will be PK as below. If the file is a proper, uncorrupted .odt file, then it will open with Writer.

Good .odt file opened with Notepad.png
Good .odt file opened with Notepad or Notepad++. Note it starts with PK showing it is a ZIP file.

Sometimes the .odt file is corrupted, and it is NOT a zip file. In this case, when you open it with Notepad you do not see PK - the file is usually completely empty as below. If you open such a file with Writer, Writer sees it is not a ZIP file and decides it must therefore be an ASCII TEXT file (like the .txt files produced by Notepad). Writer therefore opens a pop-up ASCII Filter Options window for you to tell Writer what type of TXT file it is. When the file opens, it is full of "######" which is (I think) how Writer displayes the NUL character.

empty .odt file.png
Bad .odt file which is NOT a ZIP file, and is actually full of zeros.

ASCII Filter Options window.png
ASCII Filter Options window when opening a bad .odt file, or any file where Writer does not recognise the data format
ASCII Filter Options window.png (10.35 KiB) Viewed 9454 times
AOO 4.1.6, Windows 7 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.
John_Ha
Volunteer
 
Posts: 6800
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby BrianHoef » Thu Jun 02, 2016 5:12 am

The Unarchiver solved the problem of the endless loop, but I'm not able to open content.xml. I end up getting a "general input output error," which seems...very not promising.
OpenOffice 4.1.2
Mac OS 10 El Capitan
Version 10.11.4
BrianHoef
 
Posts: 3
Joined: Mon May 30, 2016 2:02 am

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

Postby John_Ha » Thu Jun 02, 2016 9:19 am

Either upload the file here (128kB max), or to a fileshare site, or email it to me - I have sent you a Private Message with my ID.
AOO 4.1.6, Windows 7 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.
John_Ha
Volunteer
 
Posts: 6800
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby John_Ha » Thu Jun 02, 2016 11:13 am

BrianHoef wrote:The Unarchiver solved the problem of the endless loop, but I'm not able to open content.xml. I end up getting a "general input output error," which seems...very not promising.

Brian sent me his file.

When I open the .odt file I get a Read Error in content.xml, at row 2, column 3,854 (ie a long way into the file - nearly 4,000 characters in).

Clipboard01.png
Read Error
Clipboard01.png (5.85 KiB) Viewed 9401 times

The content.xml file contains two lines, where the second line is very long as it is the entire document. The (first) problem is located at the shown cursor position in row 2, at column 3,854.

Clipboard03.png
First error is located at Column 3,854 in Row 2 of content.xml

The problem is that office:name is defined twice at the beginning of content.xml, and then redefined, with a different definition, in multiple places in the file. This is a known bug in Writer.

The solution is simple - delete each of these multiple definitions as described by acknak in his post here.

1 Unzip the .odt file - I used 7-Zip. It looks like this:

Clipboard02.png

2 Extract content.xml (drag it out of 7-Zip)

3 Open content.xml with an editor. I use Notepad++ with the XML Tools plug in so that it "pretty prints" the xml with line breaks and indents to make things easier to read.

4 The definition of office:name at the beginning of the file has two definitions. I deleted the second definition - everything in blue - just in case. Notice the number ends in ...561:

<style:style office:name="__Annotation__259_10187283561" office:name="__Annotation__272_10187283561" style:name="P1" style:family="paragraph" style:parent-style-name="Standard">

5 Search the file for more occurrences of office:name=. There were lots like the following, where you note the number is different as well - it ends ...356. The first occurrence is at column 3,854:

<office:annotation office:name="__Annotation__205_1018728356">

The problem is because this line is giving office:name a new definition and you aren't allowed to do that! Hence, I deleted everything in blue so the line now reads:

<office:annotation>

6 I then found all the other occurrences of these re-definitions throughout content.xml and deleted them all.

7 re-insert content.xml back into content.xml (drag it back into 7-Zip)

Now open the .odt file with Writer - it is fixed.
AOO 4.1.6, Windows 7 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.
John_Ha
Volunteer
 
Posts: 6800
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby lymsc » Tue Jun 14, 2016 7:05 am

can someone please take a look at this and see if they can recover anything I have tried so many things that I have found on this site with no luck.
thanks for any and all help.
Attachments
hard drive list1.ods
(1.5 KiB) Downloaded 88 times
windows 10 open office 4.1.1
lymsc
 
Posts: 1
Joined: Tue Jun 14, 2016 7:01 am

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

Postby John_Ha » Tue Jun 14, 2016 9:57 am

Sorry - your file is tiny, and only has junk in it - most is "FFFFFFFFFFFFFFFFFFFF".

See Using Recuva to un-delete Writer temporary files for help recovering the temporary files which Writer wrote while you were editing the .odt file, and then deleted when Writer was closed. It does not work if you were editing a .doc file. You will need to show hidden files by Start > Control Panel > Folder options > View > tick Show hidden files.

Search for files named something like TEMP_PATH\sv1kposb.tmp\sv1kv4ak.tmp, where TEMP_PATH is the Temporary files path set up in Tools > Options > OpenOffice > Paths; and \sv1kposb.tmp\ is a folder. The default is C:\Users\your_name_on_your_PC\AppData\Local\Temp.

Rename recovered files with names like sv1kv4ak.tmp to sv1kv4ak.odt and try to open them. If what you were editing had images in it, some of the .tmp files will be images.

It is a little strange for a folder to have a name like "sv1kposb.tmp", with a dot in the name, followed by the three characters tmp, which make it look like a file, but that is what Writer does. You are therefore looking to recover files with names like "C:\Users\John\AppData\Local\Temp\sv1kposb.tmp\sv1kv4ak.tmp" - note that there is a ".tmp" in the folder name AND a ".tmp" in the file name.

Some hints ...

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

Always ?? set Create A Backup copy to ON. This keeps the previously saved version of fred.odt as fred.bak in the Backup folder. Do so by: Tools > Options > Load/Save > General ... The Backup folder location is shown by Tools > Options > OpenOffice > Paths ... You will need to switch on Show hidden files (Control Panel > Folder Options > View > tick Show hidden files) 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.
AOO 4.1.6, Windows 7 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.
John_Ha
Volunteer
 
Posts: 6800
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby RoryOF » Tue Jun 14, 2016 9:58 am

I got nothing usable from it.
Apache OpenOffice 4.1.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29560
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby oo-sc16 » Sun Jul 17, 2016 7:41 pm

I have the same corrupted ODT file problem as many others. I was working in OO Writer on my laptop when my battery died and the laptop shut down. When I recharged my battery and restarted my laptop I saw that my OO file was still there so I kept working, saved it on a flash drive and thought everything was OK. When I moved the flash drive to another PC and tried to open the file in OO I got the corrupted file message. I then went back to my laptop and got the same message. I've tried all the suggestions here and nothing works.

The only thing that gives me hope that the file may still exist is that when I open the file in Notepad I see a lot of gibberish characters starting with the letters PK. I see that John_Ha wrote a post recently (https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=1532&start=450#p388215) in which he described what the PK means. What I am not clear on is if the PK gibberish is actually my lost document and if so is there any way to convert the gibberish into the actual text?

So if John_Ha sees this or anyone knows the answer to that question and can post it I would greatly appreciate it. Thanks.
OpenOffice 4.1.2 on Windows 10
oo-sc16
 
Posts: 2
Joined: Sun Jul 17, 2016 7:25 pm

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

Postby RoryOF » Sun Jul 17, 2016 8:16 pm

I leave investigation of your existing file to others; as a possible alternate route for a recovery, do this as soon as possible:

To try and recover your file, you should look in the backup and temporary directories pointed to by /Tools /Options /OpenOffice : Paths. Rename any files in those to type the ODF type used and see if they contain your data. Download Recuva or PhotoRec (only one needed) and let it do an indepth recovery of deleted files on your computer. You may get a file containing some or all of your data (or not). Do this as a first priority; other use of the computer may overwrite and existing but deleted files and prevent their recovery. There is no guarantee that you will recover anything useful.
Apache OpenOffice 4.1.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29560
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby John_Ha » Sun Jul 17, 2016 9:10 pm

Assume your file is called fred.odt. Rename it to fred.zip. Now double-click it. If it is a good .odt file you will see something like this, where content.xml is the document text and markup tags.

Clipboard01.png

If you can see content.xml, drag it onto the desktop.

- Now open it with Notepad - be sure to have Format > Word Wrap ..., ticked in Notepad.
- The file will have lots of XML tags, but can you see your text? Close it without saving it.
- If you could see your text, then create a new file with Wrtiter called test.odt and type a few words in it.
- Save it, rename it to test.zip and double click it.
- Drag content.xml into test.zip so as replace the one already there.
- Rename test.zip to test.odt and open it with Writer.

With (a great deal of) luck, you should have your text although the formatting may be messed up.

If you cannot see content.xml in fred.zip, then you cannot recover anything from the file and you will need to go to Using Recuva to un-delete Writer temporary files for help recovering the temporary files which Writer wrote while you were editing the document, and then deleted when Writer was closed.
AOO 4.1.6, Windows 7 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.
John_Ha
Volunteer
 
Posts: 6800
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby John_Ha » Mon Jul 18, 2016 11:47 am

oo-sc16 wrote:The only thing that gives me hope that the file may still exist is that when I open the file in Notepad I see a lot of gibberish characters starting with the letters PK. I see that [b]John_Ha wrote a post recently ... in which he described what the PK means. What I am not clear on is if the PK gibberish is actually my lost document and if so is there any way to convert the gibberish into the actual text?

An .odt file is a ZIP file. See the image below. (Try this with a good, test .odt file and compare it with your bad .odt file).

The first PK in red at the beginning of the file identifies the .odt file as being a ZIP file.

The readable text in blue is (basically) data about the files and folders stored in the ZIP file. There is more similar readable text towards the end of the file. This text is metadata - ie data about what is stored in the ZIP file.

The "gibberish" in green, which should go almost all the way to the end of the file, is not "gibberish" - it is the compressed file data. Un-zipping the file converts this "gibberish" back into the actual files.

So, a good .odt file should start like the image when you look at it with Notepad. Note that Notepad will be very, very, very slow opening a large file - something like Notepad++ is much better with large files.
Attachments
Clipboard01.png
Last edited by John_Ha on Thu Jul 21, 2016 10:38 am, edited 2 times in total.
AOO 4.1.6, Windows 7 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.
John_Ha
Volunteer
 
Posts: 6800
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby oo-sc16 » Wed Jul 20, 2016 8:48 pm

Hi guys, thanks for the replies. As mentioned I tried all the recovery options described in this thread. I didn't specifically mention I tried Recuva and the others but I thought by saying I tried everything that would be assumed.

John_Ha I also appreciate your response but you seem to be saying two contradictory statements:

"If you cannot see content.xml in fred.zip, then you cannot recover anything from the file" and "The "gibberish" in green, which should go all the way to the end of the file, is the compressed file data."

I tried the zip method and the content.xml file was empty. But I was able to open the odt file in Notepad and that's where I see the gibberish beginning with the letters PK. So that's why your statements confuse me because logically if I have the data as a compressed file it would seem like there should be some way to "un-compress" this and reclaim the text that was in my OO word file.

But judging by the responses so far it appears there is nothing available to un-compress a compressed data file, or perhaps there is something within all that gibberish that is causing the corruption and preventing OO from reading it? Too bad there isn't something I could add or remove to the gibberish that would fix the corruption.

(PS: I can't really upload the file or share the gibberish text because it contained private and sensitive information.)
OpenOffice 4.1.2 on Windows 10
oo-sc16
 
Posts: 2
Joined: Sun Jul 17, 2016 7:25 pm

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

Postby John_Ha » Thu Jul 21, 2016 10:25 am

oo-sc16 wrote:John_Ha I also appreciate your response but you seem to be saying two contradictory statements:

"If you cannot see content.xml in fred.zip, then you cannot recover anything from the file" and "The "gibberish" in green, which should go all the way to the end of the file, is the compressed file data."

When you un-zip the file, which you can do in Windows by double-clicking a ZIP file, you see what is inside it. The text you wrote is inside content.xml.

If you do not un-zip the file, but instead open the file with Notepad, you see the "gibberish" which is not rubbish - it is the compressed (using the ZIP compression algorithm) data. Un-zipping converts the "gibberish" to the files.

Repeat what you did with a good, test.odt file and compare what you see with what you see when you do the same with your bad .odt file.

oo-sc16 wrote:I tried the zip method and the content.xml file was empty

I am sorry but you have lost your data. Recovering the temporary files is your last resort - see Using Recuva to un-delete Writer temporary files.

I have sent you a Private Message with my email ID so you can send the file to me if you wish.
AOO 4.1.6, Windows 7 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.
John_Ha
Volunteer
 
Posts: 6800
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby teacorgi » Thu Jul 21, 2016 10:19 pm

Hi ! I've been having the same problem most everyone else in the forum has had, a over hasty restart resulted in a large writing document to become corrupted. I've used Puran recovery and managed to find a document that at least appears to me that it should work but I am unable to unzip it. I tried using one of those zip fix programs and was able to unzip it then but that only gave me the attached result. ANY help would be appreciated at this point- !!
Thank you for your time !
Attachments
hebb.png
hebb.png (5.45 KiB) Viewed 9025 times
heb.png
OpenOffice 4.1.2 on Windows 8.1
teacorgi
 
Posts: 1
Joined: Thu Jul 21, 2016 10:09 pm

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

Postby John_Ha » Fri Jul 22, 2016 11:20 am

Welcome to the forum.

I am sorry but there is no content.xml file in the unzipped .odt file which means all your data is lost.

Your only hope is to see Using Recuva to un-delete Writer temporary files for help recovering the temporary files which Writer wrote while you were editing the document, and then deleted when Writer was closed.
AOO 4.1.6, Windows 7 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.
John_Ha
Volunteer
 
Posts: 6800
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby RoryOF » Fri Jul 22, 2016 12:24 pm

As John_Ha says, Recuva or PhotoRec will be the best course to follow, but there is no guarantee you will find anything useful.

The sooner such course is followed the better - even before fiddling with the damaged file - as continued use of the computer is almost certain to use (i.e. overwrite) sections of the hard drive previously used for temporary storage and file manipulation by OpenOffice. Once these have been overwritten Recuva/PhotoRec cannot recover anything useful from them,
Apache OpenOffice 4.1.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29560
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

PreviousNext

Return to Writer

Who is online

Users browsing this forum: Google [Bot] and 15 guests