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

ERROR: File Structure Error

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


Joined: 25 Sep 2005
Posts: 3

PostPosted: Sun Sep 25, 2005 11:27 pm    Post subject: ERROR: File Structure Error Reply with quote

Greetings!
I am using Open Office 1.0.4. I am trying to open my previously saved file but get following error.
" Error in file structure while importing.."
I tried to open it with win zip.
Now in winzip when I try to open file content.xml I get following error
"bad CRC 4322C1ef (should be 9bc4a496)"

Please note that I have linked other sheets in one sheet.

Could anybode tell the solution and how do I get rid of getting this error in future.

I may send the file if someone desires.
Thanking
M.MaShaAllah
_________________
mis@leisuretextiles.com
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


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

PostPosted: Mon Sep 26, 2005 12:11 am    Post subject: Re: ERROR: File Structure Error Reply with quote

masha wrote:
I may send the file if someone desires.

Take a look at your private messages.

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


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Mon Sep 26, 2005 4:46 am    Post subject: Re: ERROR: File Structure Error Reply with quote

masha wrote:
Now in winzip when I try to open file content.xml I get following error
"bad CRC 4322C1ef (should be 9bc4a496)"


A CRC [cyclic redundancy check] error usually indicates a corrupt file, as in an old floppy that has been sitting around for an age and has deteriorated. That is one reason why CRCs were invented. Finding a flaw can be simple or extremely difficult [I've had some little success with other files using a hex editor.] I hope someone can offer some positive assistance, but sometimes you have to simply shrug and get on with it. From the start, over 30 years back, I was told "Keep more than one copy of important information, and an additional hard-copy if really important."

P.S. 1.0.4? Time to update perhaps ...but I'm a bit slow there myself. So I'm not sure if there are problems from one version to another in reading some files.

David.
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


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

PostPosted: Mon Sep 26, 2005 12:05 pm    Post subject: Re: ERROR: File Structure Error Reply with quote

masha wrote:
I am using Open Office 1.0.4.

As the previous poster said, this version is very old. Try an update.

masha wrote:
I am trying to open my previously saved file but get following error.
" Error in file structure while importing.."

Same here with OOo 1.1.5

masha wrote:
I tried to open it with win zip.
Now in winzip when I try to open file content.xml I get following error
"bad CRC 4322C1ef (should be 9bc4a496)"

I gave it a try with TugZip from http://www.tugzip.com/. That program didn't complain about a CRC error although one of the extracted files contained a lot of errors. But anyway, with TugZip I extracted the folder META-INF and the files manifest.xml, content.xml, meta.xml, settings.xml and styles.xml. Only content.xml contained a lot of errors. All other files were ok. My attempt to repair content.xml didn't work as I expected. So I did this:
- I opened context.xml with Firefox and looked for the first error.
- I opened context.xml with PSPad http://www.pspad.com/en/ and deleted everything after the first error, then I inserted the missing closing tags
Code:
      </table:table-row>
    </table:table>
  </office:body>
</office:document-content>

and saved content.xml
- I zipped all the extraced and the one "repaired" file into one zip archive with TugZip and renamed it to "Repaired Part Follow Up List Local.sxc".

After that I could open the new document. I'll send this document back to you and hope that that part contains at least a little of your data.

masha wrote:
Could anybode tell the solution and how do I get rid of getting this error in future.

Backup your files and try to use a newer version of OOo.

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


Joined: 25 Sep 2005
Posts: 3

PostPosted: Tue Sep 27, 2005 2:51 am    Post subject: Error: Error in File Format Reply with quote

Greetings!
I must thank you for the efforts you made.
Could some one throw light why file get corrutp and how to avoid it?

I have done following to avoid such in future
1. Changed the default save format to MS Excel 97/2000.
2. Configured BackUP Option to maintain Backup copy automatically.

Will you please comment on the above precations and if something is missing will you please suggest.

Thanking!
M.MaShaAllah
_________________
mis@leisuretextiles.com
Back to top
View user's profile Send private message
GregoryM
General User
General User


Joined: 01 May 2006
Posts: 5

PostPosted: Mon May 01, 2006 2:37 pm    Post subject: Reply with quote

(sorry to bump an old topic, but I thought it best to reply to the most relevant one I found by searching, rather than a topic that just points to this one)

I have a .ods that I can no longer open (it has a macro if that makes a difference). The data is kind of private, and also this seems a good opportunity to learn the OOo file format a bit.

First things first, the error message:
Read-Error .
Format error discovered in the file in sub-document styles.xml at 2,4012(row,col).

So I renamed/unzipped the .ods and looked at styles.xml
<style:table-cell-properties xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" fo:font-style="italic" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" fo:font-weight="bold"/>

Column 4012 gets the cursor between the i and the c of italic, I don't see anything at all wrong with it.

I thought I might aswell try rezipping it but with the styles.xml file from a working .ods, it gave the same error (which is the same place).
Surley looking at the styles.xml is the right thing to do, given the error message.

I would be ever so grateful to the help with getting this repaired.
And an additional/curiosity question for after: Why is it that OOo files would get damaged?
_________________
From Gregory
Back to top
View user's profile Send private message
9point9
Moderator
Moderator


Joined: 31 Aug 2004
Posts: 3875
Location: UK

PostPosted: Mon May 01, 2006 3:00 pm    Post subject: Reply with quote

GregoryM wrote:

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

This is the most frequent kind of error. Sorting it normally isn't too much of a problem.

I have produced a basic text recovery script for Linux (see my sig). You could do the same thing manually by taking the content.xml file and doing a find and replace on all <> tags.

GregoryM wrote:
And an additional/curiosity question for after: Why is it that OOo files would get damaged?

Anyones guess. It is also possible with MS formats in MS Office so OOo is not alone. The previous poster suggested this:
Quote:
1. Changed the default save format to MS Excel 97/2000.

I would recommend that people do not do this. It is analogous to wanting to make spelling mistakes whilst writing and so choosing to write in another language that you barely know and have never been to a country where it is spoken.
_________________
Arch Linux
OOo 3.2.0

OOoSVN, change control for OOo documents:
http://sourceforge.net/projects/ooosvn/
Back to top
View user's profile Send private message Visit poster's website
GregoryM
General User
General User


Joined: 01 May 2006
Posts: 5

PostPosted: Mon May 01, 2006 3:11 pm    Post subject: Reply with quote

9point9 wrote:

I have produced a basic text recovery script for Linux (see my sig). You could do the same thing manually by taking the content.xml file and doing a find and replace on all <> tags.

I don't quite get that. (I'm not using Linux so can't use the script)
But what should I find and what should I manually replace it with? I should this be in the styles.xml where the error is reported, or actually do it in the content.xml ?


9point9 wrote:

I would recommend that people do not do this. It is analogous to wanting to make spelling mistakes whilst writing and so choosing to write in another language that you barely know and have never been to a country where it is spoken.

Yeah, I thought that was stupid too because you have no chance in being able to repair an MS file really.
_________________
From Gregory
Back to top
View user's profile Send private message
9point9
Moderator
Moderator


Joined: 31 Aug 2004
Posts: 3875
Location: UK

PostPosted: Mon May 01, 2006 11:19 pm    Post subject: Reply with quote

[quote="GregoryM"]
9point9 wrote:

But what should I find and what should I manually replace it with? I should this be in the styles.xml where the error is reported, or actually do it in the content.xml ?

Content.xml defines content so at the very least you can extract the plain text of the document. This is the most basic recovery and can then be pasted into a new document for formatting. While it is possible to do this manually cutting and pasting each line, replacing all of the XML tags in between with newlines is another way of doing it far quicker. This will give you a plain text file with newlines for every paragraph.
_________________
Arch Linux
OOo 3.2.0

OOoSVN, change control for OOo documents:
http://sourceforge.net/projects/ooosvn/
Back to top
View user's profile Send private message Visit poster's website
hol.sten
Super User
Super User


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

PostPosted: Tue May 02, 2006 11:19 am    Post subject: Reply with quote

GregoryM wrote:
I don't quite get that.

Perhaps one of this threads helps you with your problem:
- http://www.oooforum.org/forum/viewtopic.phtml?t=30992
- http://www.oooforum.org/forum/viewtopic.phtml?t=31277
- http://www.oooforum.org/forum/viewtopic.phtml?t=24208

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


Joined: 01 May 2006
Posts: 5

PostPosted: Tue May 02, 2006 3:57 pm    Post subject: Reply with quote

Well that means that I can get the figues and descriptions back, but it was a slightly complicated spreadsheet(well 3 sheets) and will take a bit of hard work to get it how I wanted.
Luckily it wasn't very long (only a month worth of data), which I guess is why I hadn't saved a backup copy of the file yet.

Grrr, I hate long work like this, but it seems my only option...
_________________
From Gregory
Back to top
View user's profile Send private message
GregoryM
General User
General User


Joined: 01 May 2006
Posts: 5

PostPosted: Wed May 03, 2006 11:36 am    Post subject: Reply with quote

Oh, missed your reply there hol.sten
Thanks very much, but I have fixed my file now wahooo!!!!!

I decided to break the content.xml up a bit by adding linebreaks between some tags, which ment the error wasn't on line 2.
Eventually isolated the tag where the problem came from, and broke that down further by adding line breaks between each attribute/value.
So the error was on one attribute and it's value, I deleted it and opened the file in Firefox, couldn't see the xml file but the error had changed. Then I looked, and yes that attribute had been repeated in the same tag with the same value so I thought no worries in deleting it (there was no question of what value was right).
So yeah, Firefox reported the next error, I did similar steps (although faster as it was slightly isolated from the first line break adding).
Just those two duplicates I had to fix, zipped it up and had my spreadsheet back! Very Happy

I really think instructions for this repairing of corrupted files should be pinned or something on the forum so it's quick for people to find and follow.

But thanks for all your help everyone.
I'm now kind of hoping this would happen at work, although a bad thing to wish I would get to show off at how I can fix it. Sadly I think most of the office documents are saved as microsoft formats for the 5-10% of computers that have/use MS office.
_________________
From Gregory
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