Format error in sub-document context.xml

Discuss the spreadsheet application
Post Reply
KR88
Posts: 2
Joined: Fri Apr 05, 2024 2:30 am

Format error in sub-document context.xml

Post by KR88 »

Hello

I've tried to help a friend who has a ODS.document and gets the line :
Read Error. Format error discovered in the file in sub-document content.xml at 2,95735(row,col) when he opens it.

He has got Libreoffice but when I open it with OpenOffice I get a text that the file is damaged. If I repare it with Openoffice I get an repared empty file. Is the file completely lost or can it be fixed ?

Thanks
Openoffice 4.1 on Windows 11
FJCC
Moderator
Posts: 9288
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Format error in sub-document context.xml

Post by FJCC »

If you post the document here, someone can take a look at the internal structure and possibly fix it. To post a document, click Post Reply and look for the Attachments tab just below the box where you type a response.
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: 34622
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Format error in sub-document context.xml

Post by RoryOF »

You should post the original damaged document, not a version after any attempt to repair it.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
KR88
Posts: 2
Joined: Fri Apr 05, 2024 2:30 am

Re: Format error in sub-document context.xml

Post by KR88 »

According to my friend its some private personal stuff that is in the file (I dont have a clue whats in there) and I dont think he would want it to be all over the internet. Is there a way to send it private to someone ?

Does that happen a lot that you have this message when you open an ods.file ? I have never had it personally but I have around 75 different files on a usb and I don't want to lose 10 years of work
Openoffice 4.1 on Windows 11
FJCC
Moderator
Posts: 9288
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Format error in sub-document context.xml

Post by FJCC »

I will send you a private message with my email address.
It is not frequent that documents get corrupted, but it can happen. Always back up documents. And a usb is particularly likely to get lost or damaged.
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.
FJCC
Moderator
Posts: 9288
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Format error in sub-document context.xml

Post by FJCC »

I got the document but I can't extract the content.xml file. The ods file does open as a zip archive but the tools I have on WIndows and Linux Mint say "An error occurred while extracting the file" when I try to extract content.xml. I can successfully extract other files from the archive, e.g. meta.xml.
If someone else would like to try, please send a PM to KR88.
If I try to open the ods file in LibreOffice (the document started in LibreOffice), I do get a message about an error at 2,98000 (approx), so there is something in the content.xml.
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
lader
Posts: 47
Joined: Mon Jul 02, 2018 6:10 pm

Re: Format error in sub-document context.xml

Post by lader »

I think that a RAR or ZIP program can repair a damaged zip archive with a certain parameter turned on (it is indicated in the help of the given program).
LibreOffice 7.6.6.3 on Ubuntu 22.04.4 LTS
FJCC
Moderator
Posts: 9288
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Format error in sub-document context.xml

Post by FJCC »

I managed to open content.xml and it's a mess. It seems to be only style definitions. I couldn't find any user data, though I was simply scrolling through, so I easily could have missed something. Near the end of the file, it is badly damaged. For example

Code: Select all

<style:style style:namepable-cell-properties style:text-align-source="value-type" style:repeat-content="false" style:rotation-align="none"/>
<style:paragraph-properties fo:margin-left="0cm"/>
<style:text-properties style:font-name="Calib8r1w -properties style:font-name=" Calibri" fo:font-size="8pt" style:font-size-asian="8pt" stylet-snt-style-name="Default" styiyle-name="Defaultyle:paragraph-properties fo:text-e=" Defa-style-name="N119">
	<style:table-cell-properties se-complex="8pt"/>
</style:style>
<style:styl-name="Deyle:foU"2ahaph-properties fo:text-align="center" forties l-thaph-properties fo:text-align="center" forties l-thaph-properties fo:text-align="center" forties l-thaph-properties fo:text-align="center" forties l-thaph-properties fo:text-align="center" forties l-thaph-pta-styare-21-/>
</style:style>
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: 34622
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Format error in sub-document context.xml

Post by RoryOF »

Once or twice on Forum we have come across content.xml being merely style definitions. I think it is probably caused by over-hasty close down of the computer, before the file has been fully generated and written to disk.

An outside chance: there might be a deleted work file on the disk drive. Worth running Recuva or PhotoRec as soon as may be to see if there is such a file, but don't have high expectations.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply