Format Error for document after hardware problem

Discuss the word processor
Post Reply
MorbidWanderer5
Posts: 4
Joined: Thu Oct 12, 2023 8:46 am

Format Error for document after hardware problem

Post by MorbidWanderer5 »

Hello. I am here reaching out to see if someone can help me fix a format error in one of my files. When I open it, it reads "Format Error discovered in the file in sub-document content.xml at 2, 69958(row, col).

I looked in here before and found a tutorial, but some of the details don't match what I have and I just don't know how to go about fixing it myself all the way. Is there anyone who can help me somehow?

 Edit: Changed subject, was Need Help With A Format Error 
Make your post understandable by others 
-- MrProgrammer, forum moderator 
Last edited by MrProgrammer on Sat Oct 21, 2023 9:34 pm, edited 1 time in total.
Reason: Edited topic's subject
OpenOffice 4.1.7/Windows 10
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Need Help With A Format Error

Post by RoryOF »

Please upload your original damaged file to the Forum; or if too large, to a filesharing site and post a link to it.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
MorbidWanderer5
Posts: 4
Joined: Thu Oct 12, 2023 8:46 am

Re: Need Help With A Format Error

Post by MorbidWanderer5 »

RoryOF wrote: Thu Oct 12, 2023 10:40 am Please upload your original damaged file to the Forum; or if too large, to a filesharing site and post a link to it.
https://mega.nz/file/zc0DyJTK#59bdi_7dq ... T4rvCwn2vs

The file was too big to attach, so here is the link for you to access it. I appreciate you taking the time to help me out.
OpenOffice 4.1.7/Windows 10
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Need Help With A Format Error

Post by RoryOF »

My tools are showing internal component content.xml as being uninflatable. This is a plain text file, so it is presumably severely damaged. Perhaps some other Forum volunteer, using different tools, will have more success.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
JeJe
Volunteer
Posts: 3132
Joined: Wed Mar 09, 2016 2:40 pm

Re: Need Help With A Format Error

Post by JeJe »

You could try some other xml error fix sources. A quick search gives plenty

https://www.easeus.com/file-recovery/fr ... -file.html
https://alberthoitingh.com/2016/09/05/r ... -document/

@RoryOF
Better unzip programs can extract it, Winzip on Windows, which is available as a trial. Don't know what you have on Linux. The file text is still there (Edit: well at least a lot of it) but appears to be an error in the xml.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Need Help With A Format Error

Post by RoryOF »

in Xubuntu linux the archive manager is engrampa. The error was not one I have seen in 15 years of using linux.

I am currently working on a talk to be delivered shortly, and had no time to follow up the problem.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
MorbidWanderer5
Posts: 4
Joined: Thu Oct 12, 2023 8:46 am

Re: Need Help With A Format Error

Post by MorbidWanderer5 »

First of all, thank you taking the time again. I'm in no hurry. If you think you can fix it, then give it a go. I'll be thankful either way. No need to hurry yourself.
OpenOffice 4.1.7/Windows 10
JeJe
Volunteer
Posts: 3132
Joined: Wed Mar 09, 2016 2:40 pm

Re: Need Help With A Format Error

Post by JeJe »

Don't know anything about repairing xml files myself. Presumably - you've opened it in Notepad or something similar and seen how much of the document is there.. even if you can't repair the file with some find and replaces you can recover some of the text, if not the document itself.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
FJCC
Moderator
Posts: 9625
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Need Help With A Format Error

Post by FJCC »

Here is the content.xml that I could extract. At the location of the error, there begin to be encoding errors. The text before that could be recovered. I doubt anything can be done with the rest.
Attachments
contentRecovered.xml
(100.84 KiB) Downloaded 88 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Need Help With A Format Error

Post by RoryOF »

I tried a number of different archive utilities; one eventually worked somewhat. content.xml, which holds the text is truncated at 64K. I attach it, but if you have a backup that would be better to use.
Attachments
content.xml
(64 KiB) Downloaded 92 times
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
cwolan
Posts: 214
Joined: Sun Feb 07, 2021 3:44 pm

Re: Need Help With A Format Error

Post by cwolan »

Out of curiosity I used ODF repair tool.
[Tutorial] ODF repair tool

Due to errors in the file the recovery is partial - cf. the attached file.

I hope someone does it better.
PartlyRecovery.odt
(43.58 KiB) Downloaded 100 times
OpenOffice 1.1.5 – 4.1.16
LibreOffice 3.3.0.4 – 26.2
Windows 7,10,11 64-bit
User avatar
MrProgrammer
Moderator
Posts: 5432
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Need Help With A Format Error

Post by MrProgrammer »

My unzip tool (supplied by MacOS) reported that content.xml was damaged; it's been truncated:
  inflating: content.xml             
  error:  invalid compressed data to inflate

Inspecting the file, only the first portion of the document is present. I have no way to tell how much was lost. I added a line at the end of content.xml to supply four closing tags:
endtags='></text:p></office:text></office:body></office:document-content>'
old='Damaged File by MorbidWanderer5.odt'
new='202310131545.odt'
cd ~/Downloads
unzip "$old" content.xml
echo "$endtags" >>content.xml
cp "$old" "$new"
zip -m "$new" content.xml
 Edit: Oops. endtags should not have started with >:
endtags='</text:p></office:text></office:body></office:document-content>'  
This is all of the recoverable data I could get from your file (14 pages). Consider implementing a backup strategy on your system to reduce the pain of data loss.
202310131549.odt
(42.61 KiB) Downloaded 88 times

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
JeJe
Volunteer
Posts: 3132
Joined: Wed Mar 09, 2016 2:40 pm

Re: Need Help With A Format Error

Post by JeJe »

@MrProgrammer

FJCC's contentRecovered.xml file is the same as what I extracted - and it contains a bit more recoverable information beyond what's in your document. (101kb total)
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
MorbidWanderer5
Posts: 4
Joined: Thu Oct 12, 2023 8:46 am

Re: Need Help With A Format Error

Post by MorbidWanderer5 »

Wow. I didn't know it was that heavily damaged. If it helps, I can what lead to this. My computer had a heavy-hitting error that made it unable to start up the OS (Windows 10.) I accessed the command prompt to access the notepad and access miles from there. I successfully copied my files to a hard drive from there, then I had to wipe the disk clean before re-install the OS.

Every other file I have is working perfectly with no issues. This is the only one I found that got damaged.

If it's no problem, I'll leave the file up in case anyone manages to find a way to recover as much as possible, any more is recoverable. And, I'll definitely make to back-up more often.
OpenOffice 4.1.7/Windows 10
User avatar
LastUnicorn
Posts: 812
Joined: Sat Mar 29, 2008 2:41 am
Location: Scotland

Re: Need Help With A Format Error

Post by LastUnicorn »

For your new backup routines you might want to consider using the TimeStamp Backup extension as an additional backup tool. You can find basic information on the extension here, TimeStamp Backup, but do not download from that location as it isn't the latest version. You can download the latest version here: TimeStamp Backup (Latest Version).

As you're recreating your system anew you might want to think about replacing your OpenOffice with LibreOffice. There are several good reasons for doing so, some of which are mentioned here: [Tutorial] Considering a Switch from OpenOffice to LibreOffice? Some Useful Information
LibreOffice 25.8.4.2 (x64) installed to Windows 11 Pro. 25H2
Apache OpenOffice Portable 4.1.16 [Portable Apps]
For Java I use Adoptium Temurin JRE LTS Releases.
Post Reply