Problem description: A file is not opening with LO 4.2, 4.1.1.1 nor 3.6.7. Steps to reproduce: I can't really attach the file since it contains sensitive data and since I can't open the file I can't erase that data and attach the file for further testing. Current behavior: Lo 4.2 spits the following error msg: Read-Error. Format error discovered in the file in sub-document content.xml at 2,71736(row,col). When testing the file with http://opendocumentfellowship.com/validator the following results are shown: This file is not Valid OpenDocument 1.0! ERROR in content.xml /content.xml:2: parser error : Attribute office:currency redefined ERROR in styles.xml /www/TOM/_temp/KjixTwijWPPRsmy31sjnfWJsatZ5KOxN/styles.xml:0: Relax-NG validity error : Did not expect element header there /www/TOM/_temp/KjixTwijWPPRsmy31sjnfWJsatZ5KOxN/styles.xml:0: Relax-NG validity error : Element master-page has extra content: header Relax-NG validity error : Extra element master-page in interleave /www/TOM/_temp/KjixTwijWPPRsmy31sjnfWJsatZ5KOxN/styles.xml:0: Relax-NG validity error : Element master-styles failed to validate content Expected behavior: Open the file. Thankful for any ideas or solutions to this. This file is important for my work. Hope I can recover it somehow. Operating System: Mac OS X Version: 3.6.7.2 rc
Hi, I've faced this before. Change the file extension to zip and extract it. Open the content.xml with Emacs or other XML editors showing errors, carefully delete the error giving tags save it and re-zip the extraction. Rename the zip extension to ods. You may find similar solutions on internet. If you cannot recover, you may send the file to me and i can try(probably tomorrow night). Best regards, Zeki
Hey Zeki, thanks already so much for your fast reply. I don't have any experience at editing xml files. But I got to the Content XML file, opened that with an XML editor and the problematic cell is the following: <table:table-cell table:style-name="ce36" office:value-type="currency" office:currency="EUR" office:value="55.69" calcext:value-type="currency" office:currency="EUR"><text:p>€ 55,69</text:p></table:table-cell> The place which LO seems to have issues with is where I typed "HERE": <table:table-cell table:style-name="ce36" office:value-type="currency" office:currency="EUR" office:valueHERE="55.69" calcext:value-type="currency" office:currency="EUR"><text:p>€ 55,69</text:p></table:table-cell> Not sure what to delete or correct. Do you have an idea?
@James: You have office:currency="EUR" twice, so you should delete one of them.
@James: Also, please inform in which version did you save the spreadsheet last time, so we can try to reproduce it.
Maxim, I tried removing the first entry of office:currency="EUR". Saving that xml and compressing everthing back to zip then renaming to ods file format. When then opening the file I get: General Error: General input/output error. Then I tried the same procedure but this time removing the second entry of office:currency="EUR". The result is identical. I honestly don't recall which version I last saved the file in. Since I do a lot of LO testing I switch versions rather frequently and go along with pre-releases / master build. Could have been anything between 3.6 and 4.1.
For what it's worth I again ran the validation test on the changed file and now get: This file is not Valid OpenDocument 1.0! WARNING does not contain a /mimetype file. This is a SHOULD in OpenDocument 1.0 ERROR does not contain a manifest. ERROR content.xml is missing ERROR styles.xml is missing So looks much better, but still not opening.
(In reply to comment #6) > So looks much better, but still not opening. No, It's worse. Seems that you didn't compress the zip correctly, as the validator clearly stated that your zip is missing some files. Another possibility is that the directory hierarchy inside the zip is wrong, or the zip compressed with some compression method which LO doesn't support.
@James: You can find the version of LO that was used to save the spreadsheet, in the meta.xml file.
@James: Isn't it a duplicate of Bug 65363?
@James: Just tried to repair a similar corrupted spreadsheet by removing the duplicate office:currency entry, and I succeed. Now the spreadsheet opens by LO without problem. Sure you're doing something wrong. So if you stuck, feel free to ask. *** This bug has been marked as a duplicate of bug 65363 ***
Updating this with some info and good news: FILE IS WORKING AGAIN! :) Super-happy. If anybody runs into a similar problem here are the steps that worked for me: 1) Open a Terminal and navigate to the folder where you keep the corrupted ods. 2) Now create a new folder named 'repair' and cd to it: mkdir repair cd repair/ 3) Now extract the files with the following command: unzip ../corrupted.ods 4) The folder 'repair' now contains several files & folders, including 'content.xml' which you should edit (you don't need a special XML editor, you can use every text editor). DON'T touch the other files in that directory! 5) Now we're going to create the repaired file: zip -r ../repaired.ods ./* I had to find & replace a ton of entries and make sure to only delete every second entry (which was causing the problem in the first place. To Maxim, Jorendc, Reisi007 and Zeki: you guys have been super responsive and I'm really thankful that you all were willing to help me out. This is a great community! :)
(In reply to comment #11) > Updating this with some info and good news: FILE IS WORKING AGAIN! :) > > Super-happy. > > If anybody runs into a similar problem here are the steps that worked for me: > > 1) Open a Terminal and navigate to the folder where you keep the corrupted > ods. > 2) Now create a new folder named 'repair' and cd to it: > mkdir repair > cd repair/ > 3) Now extract the files with the following command: > unzip ../corrupted.ods > 4) The folder 'repair' now contains several files & folders, including > 'content.xml' which you should edit (you don't need a special XML editor, > you can use every text editor). DON'T touch the other files in that > directory! > 5) Now we're going to create the repaired file: > zip -r ../repaired.ods ./* > > I had to find & replace a ton of entries and make sure to only delete every > second entry (which was causing the problem in the first place. That's why i suggest you to use EMACS to mark XML Errors automatically and you may easily delete the error giving lines. Next time try it (i hope you will not face it again) ;) > To Maxim, Jorendc, Reisi007 and Zeki: you guys have been super responsive > and I'm really thankful that you all were willing to help me out. > > This is a great community! :) Thanks, thats the community :)
Created attachment 108355 [details] Office file can't open
Vaibhav: if you still run into trouble, please open a new bug since this bug here is already closed as a duplicate of another already closed bug.