When I try to open my file, all I get is the following error message:"READ-ERROR. Format error discovered in the file in sub-document content.xml at 2,1062014 (row,col)."

I've over a week of many, many hours creating 2 custom sheets ( Daily Expenses, Yearly Expenses ) within the file that I would very much like to not lose. I know nothing about how to try the recovery performed by acknak in the primary situation I'm submitting this reply to.

My file is too big to be attached to this e-mail, per the error message I got when I tried, so... would you please submit to me the step-by-step process of repair? I'm not an experienced troubleshooter of such problems.

LibreOffice 3.4.4 on XP = my system.

Thank you for any assistance you may choose to offer.

p.s.: My back-up copy has the same problem... !!!

E-mail removed, nobody will reply by mail and it will avoid spam bots to register your address (Hagar, Moderator).

Step by step instructions have been given in this topic. You need a good XML parser (I use XML Copy Editor) and find the wrong tag.If you can't attach a file, use a 3rd party site like mediafire, as many have done in this topic.

Never mind... just delete my inquiry. I copied the content.xml file to content-xml.txt, opened that file in notepad, couldn't make heads-nor-tails out of what I was looking at, so opened the file using LibreOffice SWriter 3.4.4 & wound-up with a 437 page monster file. I still can't understand what I'm looking at, nor for, so have abandoned a full week's ( every possible minute ) work & am restarting the file creation in SCalc, without starting-off by adding into an existing file, like I did before. This way, the file won't be over 400KB in size to start.

Thank you for getting back to me, Hagar, but I wouldn't even know how to get, nor what to do with, an XML parser.Respectfully,Dave

Since dahaoleboy asked for some details, and I've seen this same problem in two damaged Calc files recently, here's what I did. I'm working in Linux, so the precise steps will only work in that environment, but the overall strategy can be pursued on any system with similar tools.

0) Prep - make a copy of the damaged file, and a new directory to work in

You can see that there are actually three repeated definitions of the same attributes here.

I don't know exactly what these attributes do, and I don't know which definitions are the correct ones. The only strategy I have is to assume that the last set is the most recent and toss out the previous definitions. So, after removing the first two sets, the element looks like this:

Repeat the process for any other problems, and save the modified content.xml.

4) Replace the content.xml in the document copy with the updated (fixed) version:$ zip ../damaged_copy.ods content.xml

Text the modified copy in OOo Calc--it works! Be happy.

This is clearly a bug in OOo--it's generated and saved invalid xml--but obviously it does not happen all the time, not even with the same file. I have no idea what triggers this particular error, but thankfully it's rather straightforward to fix.

THANK YOU, THANK YOU, THANK YOU, acknak. My file is now useable & I'm indebted to you for your assistance. Also, thanks for sharing how you fixed it as that provides us all with a little training to help make us better users.

p.s.: I, too, use Linux... but only a little, so far. Someday, I'll become fully into using it... after finding compatible substitutes for Quicken, Turbo Tax, & Family Tree Maker... especially the inter-connection of the 1st two.

dahaoleboy wrote:One more question... In looking at the code you removed, ... Shouldn't (or couldn't) U7 remain, or is there something else I'm not recognizing?

Honestly, your guess is as good as mine.

There must be only one value provided for the table:end-cell-address attribute, but which one is the right one, I can only guess.

Note that the spreadsheet cell that these properties apply to is 'Daily Expenses'.U5. I'm not sure what effect the end-cell-address setting has on the referenced cells. Maybe someone else knows, or wants to dig into the ODF spec and try to understand their purpose.

Many many thanks to acknak for detailing the steps to fix this problem. After reading through this thread, I was able to recover a Calc file that had been created in OO and opened in LibreOffice. It's been used / saved in LO for a few months, but I see the LO version still references OO.

In any case, the cell that I believe caused the problem contained a link to a formula in a cell in another spreadsheet. I noticed that when I opened the recovered spreadsheet, that cell had #REF. When I converted that to a number, all the rest of the formulas worked as expected. I just wanted to share this in case it helps the excellent OpenOffice developers find a fix for this annoying bug.

I have the same problem and I need some help as well as anyone. Because I speak very bad English, I can't understand in your above recommendations of the report. I would be very very grateful if someone could help me. I can send this fail to someone's email. Please help!

Received a file by mail but it was damaged beyond what Zip Repair Tool 3.2 could recover. It only found a few graphics. None of my ordinary ZIP file programs could even open it.

MS Windows 10 - AOO 4.1.3 - LibreOffice 5.2.3.3If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.Nederlandstalig forum

MS Windows 10 - AOO 4.1.3 - LibreOffice 5.2.3.3If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.Nederlandstalig forum

I finally succeed to repair it, basing on what you said earlier!!!! But to help me, with emacs, I found the place with the problem. When opening LibreOffice, it gave me 2,324160(row,col) so I go to that position with emacs, remove repeated things, rezip, reopen with LibreOffice. The first time it tells me to fix ti, click yes and voilà!!!

It seems that the archive is damaged. Zip repair Tool reduced the critical content.xml to a zero byte file, so that looks bad.

MS Windows 10 - AOO 4.1.3 - LibreOffice 5.2.3.3If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.Nederlandstalig forum

Please somebody help me recover this file! I get the same Format Error. Tried uzipping it, are able to see the content.xml, but there are like over a dozen of "</office:automatic-styles>" tags - and whatever I tried, made the file useless... This is probably the most advanced computing I have ever had to deal with so far. Can someone help?

I was creating and saving an important open office document for my course when the system crashed. Could not get back into the file which was encoded with # all over the page.

First window popped up stating document in use 'July%202012%20couns%20essay%20prof%20issues.odt' locked for editing Unknown user.

I opened as read only and saved a copy all text showing as #. I have also saved a copy of the original now corrupted file in another folder and it opens straight into the doucument but still only shows # text all over every page.

Have a file created in OO. Saved that with LO a while back and got the "Format Error".

The problem was the same as above. One attribute was used 4 times. So removed three occurences and everything worked.Now a few weeks later, countless edits later the same problem occured. Format error, four occurences of one attribute in one tag. Removed them, xml looks ok. Can open it with xml editors without any problems, also xmllint does not complain anymore.However, I still cannot open the file. No I receive:

1. "The file is corrupted blabla click yes to repair"2. "The file '$(ARG1)' could not be repaired and therefore cannot be opened" ... I click ok and LO terminates with "General Error"

I tried many things, including the complete removal of the tag, playing around with neighboring tags etc. always with the same result.Any further suggestions? Thank you very much!