2

I have few ods files but all of a sudden it is not opening. When i open the file i get the following error. Please look at the below snapshot

enter image description here

Error on opening the file with Archive Manager:

enter image description here

karthick@karthick:/media/Datas$ zip -FF data.ods --out repaired_file.ods
Fix archive (-FF) - salvage what can
Found end record (EOCDR) - says expect single disk archive
Scanning for entries...
copying: mimetype  (46 bytes)
copying: Configurations2/statusbar/  (0 bytes)
copying: Configurations2/accelerator/current.xml  (2 bytes)
copying: Configurations2/floater/  (0 bytes)
copying: Configurations2/popupmenu/  (0 bytes)
copying: Configurations2/progressbar/  (0 bytes)
copying: Configurations2/menubar/  (0 bytes)
copying: Configurations2/toolbar/  (0 bytes)
copying: Configurations2/images/Bitmaps/  (0 bytes)
copying: content.xml  
zip warning: no end of stream entry found: content.xml
zip warning: rewinding and scanning for later entries

2 Answers 2

3

Copy the corrupt file and let OO try to repait it. What happens?

If that doesn't help, right click on the file and choose Open with Archive Manager. What happens?

If this gives an error, try repairing the archive:

to check the file for errors:

zip -T file.ods 

to try to repair the file:

zip -F file.ods --out repaired_file.ods

or

zip -FF file.ods --out repaired_file.ods
2
  • See the updated question pls..
    – karthick87
    Jul 1, 2011 at 9:46
  • @karthick87: see the updated answer
    – arrange
    Jul 1, 2011 at 10:43
2

ODS files, like all Open Document file types, are just ZIP files. You can try to repair the file using regular tools for repairing ZIPs. For example on the command line:

zip --fixfix file.ods

Beware that you should always operate on a copy of the file. If extracting data works, you might be able to re-assemble the file as a ZIP archive and load it in OpenOffice.org.

Before trying this, you should make sure the file is actually an ODS file. If you run

hexdump -C file.ods | head -1

It should look like this

00000000  50 4b 03 04 14 00 00 08  00 00 a8 a3 d3 3e 85 6c  |PK...........>.l|

That is, it should start with PK.

Also perhaps you can open the file in a different version of OpenOffice.org, or using gnumeric or Google Docs.

1
  • I tried it, its an ODS file. But still i cant able to open the file..
    – karthick87
    Jul 2, 2011 at 3:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .