ODS File Documentation
Summary
An OpenDocument Spreadsheet (ODS) is the open, vendor-neutral spreadsheet format of the OpenDocument family, standardised as ISO/IEC 26300. Its extension is .ods and its MIME type is application/vnd.oasis.opendocument.spreadsheet. A file is a ZIP archive of XML parts. It opens natively in LibreOffice Calc, in Microsoft Excel (since Excel 2007 SP2), and in Google Sheets; to share with Excel-only users, save a copy as .xlsx.
Technical details
| Feature | Value |
|---|---|
| Full name | OpenDocument Spreadsheet |
| File extension | .ods |
| MIME type | application/vnd.oasis.opendocument.spreadsheet |
| Format type | ZIP package of XML parts |
| Container / base format | ZIP archive (Deflate), XML 1.0 payload |
| Developer | OASIS (originated at Sun Microsystems / OpenOffice.org) |
| Introduced | 2005 (ODF 1.0); ISO/IEC 26300 since 2006 |
| Current version | ODF 1.3 (OASIS standard, 2021) |
| Standard | ISO/IEC 26300; OASIS OpenDocument Format |
| Open standard | Yes — published, royalty-free specification |
| Magic number (hex) | 50 4B 03 04 (ZIP PK\x03\x04) at offset 0 |
| Identifying part | First entry mimetype, stored uncompressed |
| Formula language | OpenFormula (ODF 1.2+) |
| Core parts | content.xml, styles.xml, meta.xml, settings.xml |
| Manifest | META-INF/manifest.xml |
| Encryption | Per-entry AES; keys via PBKDF2 (manifest-declared) |
| Digital signatures | Supported (XML-DSig in META-INF) |
| Excel support | Read/write since Excel 2007 SP2 (2009); ODF 1.3 in Microsoft 365 |
| Variants | .fods (flat single XML), .ots (template) |
| Related extensions | .ots, .fods, .odt, .xlsx, .csv |
| Specification | docs.oasis-open.org/office/ |
What is an ODS file?
An ODS file is the spreadsheet member of the OpenDocument Format (ODF) family, the first fully open, XML-based office standard. OASIS approved ODF 1.0 in 2005 and it was published as ISO/IEC 26300 in 2006; the current major version is ODF 1.3 (OASIS, 2021). The format grew out of the StarOffice/OpenOffice.org XML format developed at Sun Microsystems and is today the native format of LibreOffice Calc, Apache OpenOffice Calc and Collabora Office. Several governments (the UK and a number of EU states) mandate or recommend ODF for public documents precisely because it is not tied to one vendor. Its MIME type is application/vnd.oasis.opendocument.spreadsheet.
Technically an ODS file is not a single document but a ZIP archive holding several XML parts plus supporting files. The cell data and formulas live in content.xml, formatting in styles.xml, metadata in meta.xml, and a small mimetype entry identifies the format. Everything below is about how those parts are laid out and how a spreadsheet is encoded inside the XML.
The ZIP package and the mimetype entry
Open an .ods with any archive tool (rename it to .zip first if needed) and it lists a handful of entries. The package follows a rule from the ODF specification that makes the format self-identifying without decompression: the very first entry must be a file named mimetype, it must be stored uncompressed (ZIP method 0, not Deflate), and it must carry no extra field. Its content is the exact MIME string for the document type.
Archive: sheet.ods
Length Method Name
------ ------ ----
46 Stored mimetype ← first, uncompressed
0 Stored META-INF/
723 Defl:N META-INF/manifest.xml
18244 Defl:N content.xml
4102 Defl:N styles.xml
986 Defl:N meta.xml
1560 Defl:N settings.xml
3277 Stored Thumbnails/thumbnail.png
Because the mimetype file is first and uncompressed, its literal bytes — application/vnd.oasis.opendocument.spreadsheet — sit near the start of the raw file (around offset 38, just past the ZIP local header and the 8-character filename). A tool can therefore confirm a file is an OpenDocument Spreadsheet by reading a few bytes rather than parsing the whole archive. The META-INF/manifest.xml part is the package’s inventory: it lists every entry, its media type, and any encryption applied to it.
content.xml: tables, rows and cells
The actual spreadsheet lives in content.xml, inside an <office:spreadsheet> body. Each worksheet is a <table:table> element with a table:name; its rows are <table:table-row> and its cells <table:table-cell>. A cell declares its value type and carries both a machine value and a display representation, so a reader never has to guess whether a cell is a number, a date or text.
<table:table table:name="Sheet1">
<table:table-row>
<table:table-cell office:value-type="string">
<text:p>Revenue</text:p>
</table:table-cell>
<table:table-cell office:value-type="float"
office:value="1250.5">
<text:p>1250.5</text:p>
</table:table-cell>
</table:table-row>
</table:table>
The office:value-type attribute is the type system: float, percentage, currency, date, time, boolean or string. For non-string types the true value is in an attribute (office:value, office:date-value, and so on) while the nested <text:p> holds only what the user sees after number formatting. Runs of identical empty cells or repeated rows are collapsed with table:number-columns-repeated and table:number-rows-repeated counters instead of being written out one by one, which keeps a mostly-empty sheet small.
OpenFormula: how formulas are stored
Formulas are held in a table:formula attribute on the cell and are written in OpenFormula, the formula language standardised as part of ODF 1.2. To keep formulas unambiguous across applications, OpenFormula uses a namespace prefix and wraps cell references in square brackets with a leading dot.
<table:table-cell
table:formula="of:=SUM([.B2:.B10])"
office:value-type="float" office:value="8830">
<text:p>8830</text:p>
</table:table-cell>
The of: prefix marks the OpenFormula namespace; a reference like [.B2:.B10] means the range B2:B10 on the current sheet, and a cross-sheet reference names the sheet before the dot, e.g. [Sheet2.A1]. The cell stores both the formula and its last computed result (office:value), so a viewer that cannot recalculate can still show the right number. This is where most “ODS to XLSX” friction comes from: plain arithmetic and standard functions (SUM, AVERAGE, VLOOKUP) map cleanly to Excel’s OOXML formula syntax, but some functions and reference styles differ, so a complex model may not round-trip byte-for-byte.
styles.xml, meta.xml and settings.xml
Formatting is separated from data. styles.xml holds named styles, page layouts, and headers/footers; a cell in content.xml references a style by name (table:style-name) rather than embedding fonts and colours inline, so a single style definition applies to thousands of cells. Number formats (the pattern that turns 1250.5 into €1,250.50) are themselves style elements defined here.
meta.xml carries document metadata: author, creation and edit timestamps, editing-cycle count and total edit time, plus generator identification (the application and version that wrote the file). settings.xml stores view state that is not part of the document’s meaning — cursor position, active sheet, zoom level, window geometry — which is why two ODS files with identical data can differ only in this part. A Thumbnails/thumbnail.png gives file managers a preview of the first sheet, and any embedded images live under Pictures/.
Package encryption and digital signatures
ODF encryption operates at the ZIP-entry level, not on the file as a whole. When a document is password-protected, each XML part is compressed and then encrypted individually with a symmetric cipher (AES in current ODF), and the META-INF/manifest.xml records, per entry, the algorithm, the initialisation vector, and the key-derivation parameters (a salt and iteration count for PBKDF2). The mimetype entry stays unencrypted so the file is still identifiable. Because encryption is per-part, a reader decrypts and decompresses each entry independently using the key derived from the user’s password.
Digital signatures are stored as XML-DSig documents inside META-INF (for example documentsignatures.xml). A signature covers the hashes of the package parts, so altering any byte of content.xml after signing invalidates it — the standard way ODF proves a spreadsheet has not been tampered with since it was signed.
ODS and XLSX: two ZIP-plus-XML formats compared
ODS and XLSX are structurally similar: both are ZIP packages of XML parts. The differences are in the schema and the governance. ODS is the vendor-neutral ISO/IEC 26300 OpenDocument standard, native to LibreOffice, with parts named content.xml / styles.xml and formulas in OpenFormula. XLSX is Microsoft’s Office Open XML (ISO/IEC 29500), native to Excel, with a different internal layout ([Content_Types].xml, an xl/ folder, xl/worksheets/sheetN.xml) and Excel’s own formula grammar. Microsoft Excel has read and written ODS since Excel 2007 SP2 (2009), and Microsoft 365 supports ODF 1.3, so data and standard formulas move between them reliably. What does not always survive a round trip is the application-specific layer: some pivot-table options, certain chart types, and any macros, because the two formats model those features differently. There is also a flat single-XML variant, .fods, that stores the same tree uncompressed in one file, and a template variant, .ots.
References
- OASIS — OpenDocument Format v1.3 specification
- ISO/IEC 26300 — OpenDocument Format
- The Document Foundation — LibreOffice
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.