OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Recovering ODT content/repairing file

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
Piggywinkle
General User
General User


Joined: 29 May 2005
Posts: 6

PostPosted: Sun May 29, 2005 4:20 am    Post subject: Recovering ODT content/repairing file Reply with quote

I receive the following error when trying to open an .odt file :

Read-Error.
Format error discovered in the file in sub-document content.xml at 2,15954(row,col).

I can access the file as a .zip and can see and open the content.xml in notepad.

How do I find the problem from the row,col information and correct it?

TIA Tony
Back to top
View user's profile Send private message
Piggywinkle
General User
General User


Joined: 29 May 2005
Posts: 6

PostPosted: Sun May 29, 2005 4:56 am    Post subject: Reply with quote

Sorry, I should have said .ods file ..............
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Sun May 29, 2005 5:58 am    Post subject: Re: Recovering ODT content/repairing file Reply with quote

Piggywinkle wrote:
I receive the following error when trying to open an .odt file :

Which OOo 2.0 Beta are you using on which operating system? If the OOo 2.0 Beta version is not 1.9.104, try that one, because it's the most recent one.

With kind regards
hol.sten
Back to top
View user's profile Send private message
Piggywinkle
General User
General User


Joined: 29 May 2005
Posts: 6

PostPosted: Sun May 29, 2005 7:54 am    Post subject: Reply with quote

I'm already on 104. It was that version which seems to have screwed up the file for some reason.

It's a real bind as the file contains all our finances for the last n years. (I know, I should have backed it up regularly, but you just never loearn do you?!?)

Any one know how I can repair the XML file ?
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Sun May 29, 2005 8:41 am    Post subject: Reply with quote

Piggywinkle wrote:
I'm already on 104.

OK, that's the last one. But the operating system keeps to be a mystery.

Piggywinkle wrote:
It's a real bind as the file contains all our finances for the last n years. (I know, I should have backed it up regularly, but you just never loearn do you?!?)

That's hard to believe, although I read stories like that regularly.

Piggywinkle wrote:
Read-Error.
Format error discovered in the file in sub-document content.xml at 2,15954(row,col).

I took a look at a calc file of my own. I think that it will be hard to find that cell, because the cells have no numbers in content.xml.

Question: Does your spreadsheet really contain at least 15954 columns? That's hard to believe.

Advice: Before you make changes at your ods file, take at least one backup copy. Store it, where it's safe.

Suggestion: Open the content.xml file and search for the second occurrence of "<table:table-row". Take a look at all the "<table:table-cell" entries. Keep all cells in the content.xml file which seems to contain valid data. Delete all cells up to the next occurrence of "<table:table-row". Put the content.xml file back in your ods file. Good luck.

Please don't sue me, if this sends your ods file to the void.

With kind regards
hol.sten
Back to top
View user's profile Send private message
sallgood
Newbie
Newbie


Joined: 12 Jun 2005
Posts: 1

PostPosted: Sun Jun 12, 2005 7:25 am    Post subject: Reply with quote

Quote:
Format error discovered in the file in sub-document content.xml at 2,15954(row,col).


The "row" and "col" referes to the row and column of the context.xml file. The first row of the document is the xml version declaration. The second row contains the actual XML file content. "col" referes to the number of characters from the left of the second row where the error is detected, not the number of columns in your spreadsheet.

Finding a text editor that allows you to jump to a location in a file by row and column would be useful.
Back to top
View user's profile Send private message
Piggywinkle
General User
General User


Joined: 29 May 2005
Posts: 6

PostPosted: Sun Jun 12, 2005 12:51 pm    Post subject: Reply with quote

I actually recovered all my data yesterday. I used two wonderful pieces of software, XML Writer ( http://www.xmlwriter.net/ ) and Editplus ( http://www.editplus.com/ ).

XML Writer showed me that the problem (actually multiple problems in the final event) was due a duplicate declaration on a line. Editplus allowed me to put line breaks back in between each >< to make the file parsable.

The main problem was that this declaration had crept in multiple times on all of the style definition lines : xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"

I deleted them all, put all XML statements onto new lines with edit plus, recompressedto .ods and voila, it all came back.

Regrettably I've had to ditch OOo and go back to Excel ......

I now have a backup too :=) Phew !!!!!!!!!!!!
Back to top
View user's profile Send private message
yknott
Newbie
Newbie


Joined: 14 Jul 2005
Posts: 1
Location: Darmstdat, Germany

PostPosted: Thu Jul 14, 2005 6:17 am    Post subject: format error discovered in the file in sub-document context Reply with quote

yeah i had the same/similar error

i guess it is beyond the scope of OO to provide a wizard that would walk a user through importing data from a corrupt file (invalid xml)

but i installed these items too, use xml write to validate my file, removed the errors as it mentioned (some duplicates then eventually removed all style tags and i also deleted the styles.xml from the .ods)

opened fine, needed to reformat one column, a date in the format of yyyy-mm-dd, but that was hardly an issue
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Piggywinkle
General User
General User


Joined: 29 May 2005
Posts: 6

PostPosted: Thu Jul 14, 2005 8:03 am    Post subject: Reply with quote

Glad someone else benefitted from my bad experience !!

All the best.
Tony
Back to top
View user's profile Send private message
Zavier.Xero
Newbie
Newbie


Joined: 20 Jul 2005
Posts: 2

PostPosted: Tue Jul 26, 2005 7:58 am    Post subject: Reply with quote

I am still having a problem with an un-backup-ed copy of a file im working on. I do not know how to use either of those programs, so I am kind of in a jam here.

Is there any other way to solve this problem?
_________________
---
Zavier.Xero
Back to top
View user's profile Send private message Send e-mail AIM Address
Piggywinkle
General User
General User


Joined: 29 May 2005
Posts: 6

PostPosted: Tue Jul 26, 2005 11:21 am    Post subject: Reply with quote

Send it over and I'll give it a try for you.

Tony
Back to top
View user's profile Send private message
steven keyte
Newbie
Newbie


Joined: 10 Aug 2005
Posts: 1
Location: Bolton,LANCASHIRE

PostPosted: Wed Aug 10, 2005 3:10 am    Post subject: Reply with quote

I am having similar problems with a spreadsheet which we cannot now open due to this corruption and unfortunatly the back-ups we have are also seem to be corrupt!
XMLwriter identifies the error in the content.xml file as a duplicate attribute on line 2 at character 2597, but I do not know what the duplicate entry is, there does not appear to be anything obvious, but having said that, I'm not too confident of editing this file!
I've used winzip to extract the file and to re-compress it I assume you just zip the files up and replace the zip suffix with ods?
OS is W98 and OOo is 1.9.122

Regards,

Steve
Back to top
View user's profile Send private message Send e-mail
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Wed Aug 10, 2005 3:39 am    Post subject: Reply with quote

steven keyte wrote:
I assume you just zip the files up and replace the zip suffix with ods?

Yes, you're right. This has been discussed recently in this thread http://www.oooforum.org/forum/viewtopic.phtml?t=22512&highlight=.

With kind regards
hol.sten
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group