Format error in sub-document

Discuss the spreadsheet application
Post Reply
viking55
Posts: 3
Joined: Sat Apr 27, 2019 8:09 pm

Format error in sub-document

Post by viking55 »

Hello and help. For some reason my open office spreadsheet was corrupted. I get a message saying "read-error. Format error discovered in the file in sub-document content.xml at 2,72092". The document will no longer open. I have tried several programs but nothing seems to want to open the file. Is there something else I can do?

Thanks -

Gary
Open office 3.1 on Windows 7
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: OpenOffice Calc spreadsheet will not open!

Post by RusselB »

OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
viking55
Posts: 3
Joined: Sat Apr 27, 2019 8:09 pm

Re: Format error in sub-document

Post by viking55 »

Can you give me an idea of an archive manager to use? Thanks. I tried the change to a zip file method, but it didn't work.
Open office 3.1 on Windows 7
User avatar
robleyd
Moderator
Posts: 5086
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Format error in sub-document

Post by robleyd »

How did it “not work”? What did you do and what was the result?

If I recall correctly the file manager in Windows 7 will open zip files.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Format error in sub-document

Post by RoryOF »

If you are getting the error in subdocument message, this indicates that the file has a possibility of being rescued and the archive manager used by OO, a built in version of 7zip I think, has been able to open it. As you have not managed to open the file yourself, the quickest solution may be to upload it to the Forum for another to handle; if it is too large to upload (>128KB) use a file sharing site and post the URL on Forum.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
viking55
Posts: 3
Joined: Sat Apr 27, 2019 8:09 pm

Re: Format error in sub-document

Post by viking55 »

First, thanks for the help, let me explain where I am... I downloaded a file manager 7-zip file manager, which deconstructed the original .ods file into a new folder which contained the content.xml file. I was able to locate, and, I think, correct the error (small though it was) with the XML copy editor program. In any event, the XML program proclaimed the .ods file to now be "well formed". My problem now is that while the 7-zip manager program was able to deconstruct the .ods file, it will not, or I have not been able to make it open the .ods file so I can transfer the now "well formed" corrected content.xml file. Yes, 7-zip will create a folder, but not just open the file so I can change out the content.xml file. Perhaps I need a different file manager program? Hopefully I am sufficiently communicating what my problem is at this step. Without being able to crack open the ods file, I can't replace the corrected content file.

Ok, I figured out how to open the .ods file and replaced the corrupt content file with the "fixed" one. However, the new .ods file will not open. I don't even get the read-error message. So I must have done something wrong. Any ideas? Repeat the process?

Thanks.

Gary
Open office 3.1 on Windows 7
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Format error in sub-document

Post by Lupp »

How I do such things on Windows:
I mostly use an old 32-bit-WinZip 9.0 I bought decades ago, but it works for me the same way with 7-Zip (7zFM.exe).

I don't expand the ODF archive, but simply open it with the archiver program. There I select the content.xml and call my xml editor (Notepad++ with XML-tools add-in in my case) for this wrapped-in file. Having edited it, I save it back to its place (which is inside the archive). Done.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Format error in sub-document

Post by RoryOF »

I do much as Lupp does - I rename a file to type zip, then open it with my system archiver, open content.xml with XML Copy Editor and make whatever corrections I need, verify with XML Copy Editor that it is "well-formed", then Save it. XML Copy Editor then offers to reinsert it into the expanded archive, which I then close and rename to .odt (or as needed).
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply