[Solved] How do I fix / can you please fix my ODS file?

Discuss setup / installation issues - Add a spell checker, Language pack?
Post Reply
Elch
Posts: 4
Joined: Mon Nov 26, 2012 4:09 am

[Solved] How do I fix / can you please fix my ODS file?

Post by Elch »

Hi there, after closing an Neooffice spreadsheet (ods document) I could not open it again. This is the errror message that occurred:
"format error discovered in the file in subdocument content.xml at 2.254791(row,col)."
Mac OSX 10.8.2, NeoOffice® 3.3 Patch 2.
I tried to open the file in Libreoffice, Open Office (both latest versions), but get back the error above.
All attempts to unzip and repair the files (or delete styles.xml and such) did not work. E.g. after deleting the styles.xml file,
re-zipping, renaming etc Neooffice tried to automatically "repair" the file but afterwards the file actually did not have any contents
any more. So this did not work.
I also could not get hold of the error in the "contents.xml" desribed in the error message since I am very unexperienced with xml files:
to name it: I cannot handle them at all nor repair the attached file "at 2.254791(row,col)".
I was very happy to find these discussion and solutions here for the described error message but after 4 hours unsuccessfull work I now
am putting a kind request to you to find a solution:
Could you please help me out here and recover the attached Neooffice ods spreadsheet for me please?
Mediafire address removed (Hagar) (you can also find it here in case it did not upload here).
I´ve been setting up these 2 pages over some years and would be very happy to get these numbers back
to a functioning file.
Many many thanks for supporting me here! Best Regards!
Elch
Last edited by Hagar Delest on Mon Nov 26, 2012 12:17 pm, edited 2 times in total.
Reason: tagged [Solved].
OpenOffice.org 3.4.0 AOO340m1(Build:9590); Mac OS X 10.8.2
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How do I fix / can you please fix my ODS file?

Post by acknak »

There is only a tiny error in the content.xml--something to do with recorded changes (I think). I had to guess as to how to correct it, so I may have guessed wrong: check the file carefully.

And be sure to make regular backups.
 Edit: Placeholder for recovered file, deleted at User's request 
Last edited by RoryOF on Mon Nov 26, 2012 11:19 am, edited 2 times in total.
Reason: Recovered file deleted at User's request
AOO4/LO5 • Linux • Fedora 23
Elch
Posts: 4
Joined: Mon Nov 26, 2012 4:09 am

Re: How do I fix / can you please fix my ODS file?

Post by Elch »

Many thanks, acknak. the file works again! GREAT !!
Automatic backing up is now scheduled via time machine.
After I downloaded the recovered file now how can I please delete this file now from the discussion or must it stay there?
cheers, Elch
OpenOffice.org 3.4.0 AOO340m1(Build:9590); Mac OS X 10.8.2
User avatar
RoryOF
Moderator
Posts: 35232
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] How do I fix / can you please fix my ODS file?

Post by RoryOF »

I'll delete it for you off the Forum. Please delete it from Mediafire yourself, as I have no access to it there.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
User avatar
Hagar Delest
Moderator
Posts: 33650
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] How do I fix / can you please fix my ODS file?

Post by Hagar Delest »

I've removed the link.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Elch
Posts: 4
Joined: Mon Nov 26, 2012 4:09 am

Re: [Solved] How do I fix / can you please fix my ODS file?

Post by Elch »

many thanks Acknak, RoryOF and Hagar Delest. I removed the Megafire file already this morning.
Your support here is really appreciated and it saved me long long hours of work since you made that file available again.
Dear Acknak, what editor did you use to open the contents.xml please? Thanks.
cheers, ELCH
OpenOffice.org 3.4.0 AOO340m1(Build:9590); Mac OS X 10.8.2
User avatar
Hagar Delest
Moderator
Posts: 33650
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] How do I fix / can you please fix my ODS file?

Post by Hagar Delest »

For content.xml, a mere text editor is enough, an XML parser is much better, like XMLCopyEditor, Notepad++ or emacs (but requires a little configuration to get the formatting).
See also the end of this discussion: [Solved] File corrupt and therfore cannot be repaired.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Solved] How do I fix / can you please fix my ODS file?

Post by acknak »

Elch wrote:... what editor did you use to open the contents.xml please? ...
As Hagar says, most any text editor will do, although some may not like a "text" file with such long lines.

I use a command line utility called "xmllint" to locate the problem, and emacs to edit the xml. Emacs is slow with such long lines of xml, but it works.

Here is what xmllint found, btw:
$ unzip -p Logb.ods content.xml|xmlindent|xmllint -noout -
-:1146: parser error : Attribute table:id redefined
                <table:cell-content-change table:id="ct5" table:id="ct6">
                                                                        ^
Xml does not allow the same attribute to have two definitions in the same element, so one of these is extra/incorrect. I have no idea which one. 50/50 chance ... I removed the first one, table:id="ct5".

That's all that was needed for the file to load.
AOO4/LO5 • Linux • Fedora 23
lithiumion
Posts: 2
Joined: Fri May 24, 2013 11:40 am

Re: [Solved] How do I fix / can you please fix my ODS file?

Post by lithiumion »

Hello,

I'm facing the same problem with an ODS file. I've used xmllint content.xml --noout

And the output was:

Code: Select all

content.xml:2: parser error : Attribute table:end-cell-address redefined
6cm" draw:z-index="4" table:style-name="ce165" table:number-columns-repeated="7"
                                                                               ^
content.xml:2: parser error : Attribute table:end-x redefined
6cm" draw:z-index="4" table:style-name="ce165" table:number-columns-repeated="7"
                                                                               ^
content.xml:2: parser error : Attribute table:end-y redefined
6cm" draw:z-index="4" table:style-name="ce165" table:number-columns-repeated="7"
                                                                               ^
content.xml:2: parser error : Attribute draw:z-index redefined
6cm" draw:z-index="4" table:style-name="ce165" table:number-columns-repeated="7"
                                                                               ^
Any help is really appreciated on how to fix this.

Cheers
NeoOffice V3.3 with MacOS 10.8
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Solved] How do I fix / can you please fix my ODS file?

Post by acknak »

And the answer is the same as before: follow the steps described in the older messages here, or make your damaged document available (either attach it here or use a file sharing site) and someone here can try to fix it for you.
AOO4/LO5 • Linux • Fedora 23
Elch
Posts: 4
Joined: Mon Nov 26, 2012 4:09 am

Re: [Solved] How do I fix / can you please fix my ODS file?

Post by Elch »

Hi lithiumion, thanks to Acknak, RoryOF and Hagar Delest that they fiexed my file the other day. Making it available to them might solve your problem the easiest way. I myself do work on a Mac and was not able to find any editor that would give me a chance to see in an appropriate format what acknack wrote above on 27th nov 2012. So I was very happy that he fixed my file and I could use it again ... now I am constantly backing up all files with timemachine. That helped a lot until today. Luckily I was not struck by any error of the kind above any more as well. cheers, best luck to get your file up n running again, Elch
OpenOffice.org 3.4.0 AOO340m1(Build:9590); Mac OS X 10.8.2
lithiumion
Posts: 2
Joined: Fri May 24, 2013 11:40 am

Re: [Solved] How do I fix / can you please fix my ODS file?

Post by lithiumion »

Acknak and Elch; Thank you both for the help.
My file now opens, although only on Linux/LibreOffice 3 for some weird reason! :)
NeoOffice V3.3 with MacOS 10.8
Post Reply