Help me get my ODS back!
March 22, 2010 3:04 PM   Subscribe

I'm trying to recover an .ODS file from OpenOffice that was accidentally deleted. Can you help me get the "header"?

I'm using a deleted file recovery tool for Mac, and I can add a file type to look for in the file list. I'm looking for an OpenOffice spreadsheet, .ODS and I need to add information. The instructions are as follows:

"Specify signature by entering header (maximum of 8 bytes) in hexadecimal format and its corresponding offset in decimal format."

Can anyone help me get this information for this type of file?
posted by setanor to Computers & Internet (6 answers total)
Googling for ODS filetype header hex returned this:
Detailed information for file extension ODS:
Primary association: OpenOffice/StarOffice
Company: Sun Microsystems, Inc.
File classification: XML
Mime type: application/vnd.oasis.opendocument.spreadsheet, application/x-vnd.oasis.opendocument.spreadsheet
Identifying characters Hex: 50 4B 03 04 , ASCII: PK
Nothing about the offset in decimal though. Hope that helps.
posted by dirm at 3:54 PM on March 22, 2010

The header is just the first couple bytes of the file. Almost every file format in existence puts a semi-unique sequence of bytes at its start (so that if the file extension is lost or not specified the filetype can still be found). OpenOffice Spreadsheets are, believe it or not, ZIP files. And ZIP files all start with "PK" (no quotes) plus some non-printable stuff. If you can specify the bytes in hex format, it's "50 4B 03 04".
posted by sbutler at 3:57 PM on March 22, 2010

Offset (where it's found in the file) would be 0.
posted by sbutler at 3:58 PM on March 22, 2010

Thanks! I can specify it in hex, so I'll try that. Does that mean that I'll pull every zip file, or is that sequence specific to OpenOffice spreadsheets?
posted by setanor at 4:10 PM on March 22, 2010

It's every zip file you've deleted because OpenOffice docs (and MS Office 2007 docs and Java JAR files and ...) are zip files.
posted by sbutler at 4:24 PM on March 22, 2010

If you recover them as files with a .zip extension, you can look inside them with any archiver. Inside an ODS file are five files: content.xml, meta.xml, mimetype, settings.xml and styles.xml, and a bunch of folders. If that's what you see, rename the file from to whatever.ods and the Right Thing should happen.
posted by flabdablet at 5:32 PM on March 22, 2010

« Older Suggestions for how can I get DeviantART to give...   |   Agave is my enemy Newer »
This thread is closed to new comments.