[Solved] File Format Error - Recover corrupt file?

Discuss the word processor
Post Reply
captnamo
Posts: 5
Joined: Thu Aug 20, 2009 2:21 am

[Solved] File Format Error - Recover corrupt file?

Post by captnamo »

My wife uses OO Writer 2.0.4 and somehow appears she was saving in .doc format. Over 300 vocab words and definitions for a class she teaches. "Something" happened with her computer. It was running very slow. She closed programs and started virus scan, etc. Said she thought she saved the doc, but now it won't open. Error is file format error found 42,417 (row, col). I tried mailing it to my computer and it looks like it says open office text, but still same error.

No, she did not follow my rule: When you get to the point on any computer work where you'd cry if it disappeared, it's time to save a backup copy on your flashdrive or e-mail yourself a copy.

The program was NOT set to save a back up or recovery information (I'd think that they should be default settings!) I've changed that.

I'm not hopeful based on other posts, but if someone can figure if anything can be salvaged from this, I'd really appreciate it.
vocab words.doc
(118.88 KiB) Downloaded 541 times
Last edited by captnamo on Fri Aug 21, 2009 4:18 am, edited 1 time in total.
OpenOffice 2.3.0 on Windows Vista
captnamo
Posts: 5
Joined: Thu Aug 20, 2009 2:21 am

Re: File Format Error - Recover corrupt file?

Post by captnamo »

Forgot to mention, she's on Windows XP
OpenOffice 2.3.0 on Windows Vista
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: File Format Error - Recover corrupt file?

Post by RoryOF »

Open a blank document and Insert / File. You won't get much from it, I think.

Comments: you say she is using OO 2.0.4, and you indicate you are using 2.3. These are both very old versions; you should consider moving to v3.x, which can run in parallel with earlier versions until you are happy to make an absolute transition. Saving in .doc format is acceptable if one needs to distribute a mature file for editing by others, but in general it is best always to work a master file in .odt format, saving to .doc when the file is complete.

Was your wife saving to a USB device? It is not a good idea to work direct to a USB. Best to work to the hard disk and then to transfer the finished file to the USB.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
aukejan
Volunteer
Posts: 147
Joined: Tue Jul 28, 2009 6:13 pm
Location: Netherlands

Re: File Format Error - Recover corrupt file?

Post by aukejan »

There are quite a few software packages out there that allow you to repair .doc files. Most of them are .exe files (surprise, surprise), so I cannot test any of them for you. Google for "repair .doc files".
OOo 3.2.1 on Ubuntu Maverick
User avatar
Hagar Delest
Moderator
Posts: 32655
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: File Format Error - Recover corrupt file?

Post by Hagar Delest »

This is not a true .doc file, it's a RTF in fact. I've opened it with Notepad2 and removed the entry where the error was. And there are several of them. I did it because I'm unable to spot a mistake for the RTF language. I removed 2 of them and the document seems to be better but each time a new error is spotted. NB: I can open it with MS Word 2003.

So I let you continue the process. Note that this way, you lose some information but at least less than the whole file!
The file minus 2 errors:
vocab words3.rtf
(117.89 KiB) Downloaded 305 times
The 2 entries removed, corresponding to decorum and amicable:

Code: Select all

\par \pard\plain
\ltrpar\s1\sl240\slmult1\nooverflow\ql\rtlch\af1\afs20\lang255\ltrch\dbch\af1\langfe255\hich\f1\fs20\lang1033\loch\f1\fs20\lang1033{\rtlch \ltrch\loch\f8\fs24\lang1033\i0\b0{\fs24\f8\cf1 decorum - {\caps0\scaps0 dignified behavior, speech, dress} (T{\caps0\scaps0 he formalities and decorums of a\~}}}{\rtlch \ltrch\loch\f1\fs20\lang1033\i0\b0{\b0\ul\ulc0\i0\lang1033\fs24\f8\cf1 military}}}{\b0\i0\fs24\f8\cf1{\lang1033 {\*\bkmkstart preLoadWrap0}{\*\bkmkend preLoadWrap0}\~funeral were somber.}}{\b0\i0\fs24\f8\cf1  )}}

\par \pard\plain
\ltrpar\s1\sl240\slmult1\nooverflow\ql\rtlch\af1\afs20\lang255\ltrch\dbch\af1\langfe255\hich\f1\fs20\lang1033\loch\f1\fs20\lang1033{\rtlch \ltrch\loch\f8\fs24\lang1033\i0\b0{\fs24\f8\cf1 amicable - {\caps0\scaps0 showing goodwill; friendly; peaceable} (A{\caps0\scaps0 n amicable\~}}}{\rtlch \ltrch\loch\f1\fs20\lang1033\i0\b0{\b0\i0\lang1033\fs24\f8\cf1{\ul\ulc0 settlement}}{\b0\i0\lang1033\fs24\f8\cf1  soothed people's fears.}}}{\b0\i0\fs24\f8\cf1  )}}
The file opened and saved with MS Word 2003:
vocab words3-MSWord.rtf
(26 KiB) Downloaded 280 times
Note that for each entry where the is an error, you can retrieve the whole text (but not the formatting). So in the end, you should retrieve the whole file. RTF support is very poor in OOo. You should really switch to native ODF format and export in external format when needed only.

Good luck.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
captnamo
Posts: 5
Joined: Thu Aug 20, 2009 2:21 am

Re: File Format Error - Recover corrupt file?

Post by captnamo »

Sorry to be so slow at understanding, but I am unclear on the process you used here and how you identify where an error is. I opened the file in Notepad and I'm not sure how to sort through all of that.

So, if your .rtf file stops on a vocabulary word entry (incognito), you eliminate that entry, and then save the file again in .rtf format? Is there an easy way to tell when an entry starts and stops? So I should start with your .rtf file and work from there, correct?

I'm happy to work through this for my wife, just not sure how to do what you did. Merci beaucoup!
OpenOffice 2.3.0 on Windows Vista
captnamo
Posts: 5
Joined: Thu Aug 20, 2009 2:21 am

Re: File Format Error - Recover corrupt file?

Post by captnamo »

Here's what I tried. Opened vocab words3.rtf file in NotePad (don't have NotePad2). Found "incognito" and cut out the entry:

\par \pard\plain
\ltrpar\s1\sl240\slmult1\nooverflow\ql\rtlch\af1\afs20\lang255\ltrch\dbch\af1\langfe255\hich\f1\fs20\lang1033\l
och\f1\fs20\lang1033{\rtlch \ltrch\loch\f8\fs24\lang1033\i0\b0{\fs24\f8\cf1 incognito - {\caps0\scaps0 having
one's\~}}}{\rtlch \ltrch\loch\f1\fs20\lang1033\i0\b0{\b0\ul\ulc0\i0\lang1033\fs24\f8\cf1
identity}}}{\b0\i0\fs24\f8\cf1{\lang1033 {\*\bkmkstart preLoadWrap01}{\*\bkmkend preLoadWrap01}\~concealed, as
under an assumed name}}{\b0\i0\fs24\f8\cf1 (he went to the}}
\par \pard\plain
\ltrpar\s1\cf1\sl240\slmult1\nooverflow\ql\rtlch\af4\afs24\lang255\ltrch\dbch\af4\langfe255\hich\f8\fs24\lang10
33\loch\f8\fs24\lang1033 {\rtlch \ltrch\loch\f8\fs24\lang1033\i0\b0 costume party incognito)}

Then saved from NotePad as vocab words4.rtf. Opened file in MSWord 2003, but only see the first few entries on the first list. So, I don't even see as much as I can in the vocab words3.rtf file when I open in MS Word. =o(
OpenOffice 2.3.0 on Windows Vista
User avatar
Hagar Delest
Moderator
Posts: 32655
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: File Format Error - Recover corrupt file?

Post by Hagar Delest »

No, you've to use Notepad2, can be downloaded from the web, it's a freeware.

When you open the document in OOo, you get the error message file format error found 42,417 (row, col). So in Notepad2 go to that location (bottom of the window, Notepad2 displays the row,col location). Usually, there is nothing special with the corresponding character. So I guess the problem is with a wrong tag (RTF uses tags to apply the formatting). As I don't want to lose time searching for the problem with the tag, I just cut the whole line containing the error (that is from the \par \pard\plain string to the next one). Then save it under another name and try to open again. Open the files with MS Word 2003, check how it has changed the file. Each time I've done that, I increase the length of visible text. Note that you don't even need MS Word, just do that each time you get an error message.

NB: the error is located by the error message. So I don't know why you get 'incognito'. Was there an error in that line?

Afterwards, you just have to check where in the document were the cut parts and paste back the text (remove all the RTF encoding) and reapply the lost formatting.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
captnamo
Posts: 5
Joined: Thu Aug 20, 2009 2:21 am

Re: File Format Error - Recover corrupt file?

Post by captnamo »

Magnifique!

I downloaded NotePad2 and followed your procedure. Only two more errors and the file showed complete!

Thank you so much! My wife is happy and I'm a hero (even giving Hagar of the East his due credit!)
OpenOffice 2.3.0 on Windows Vista
sguggalla
Posts: 1
Joined: Tue Dec 01, 2009 8:06 am

Re: [Solved] File Format Error - Recover corrupt file?

Post by sguggalla »

Hi,

I believe there is no need to remove the corrupted lines. I had the same problem and I opened the file in Wordpad and saved it as rtf. Now it opens cleanly on OOO. Once opened in OOO, I saved it as .odt so I wont get into similar situation in future. It works ok.

Cheers
Sree
OpenOffice 3.0.0 on Windows XP
eudemus
Posts: 3
Joined: Wed Jul 07, 2010 11:49 pm

Re: [Solved] File Format Error - Recover corrupt file?

Post by eudemus »

Try downloading Abiword and see if you can open the file from that, then save as a different format (e.g. .odt or .doc). It's worked for me with several problematic .rtf files.
OpenOffice 3.2.0, Fedora 13
mohansoundar
Posts: 1
Joined: Wed Feb 01, 2012 8:24 am

Re: [Solved] File Format Error - Recover corrupt file?

Post by mohansoundar »

Abiword did the trick
Thanks

- Mohan
- Mohan
OpenOffice 3.3 on Windows XP
Post Reply