File types · Explainer

The ODS file (.ods, .fods)

An ODS file is an OpenDocument spreadsheet: LibreOffice Calc's own format and an open international standard, stored as a ZIP package of XML files. This guide explains what's inside one, how it stores values, dates and formulas, how it compares with XLSX, and has free sample ODS files to download for testing.

At a glance

Full name
OpenDocument Spreadsheet
Extensions
.ods; .fods for the single-file XML version, .ots for templates
MIME type
application/vnd.oasis.opendocument.spreadsheet
Kind
Binary container: a ZIP package of XML files (.fods is one plain XML file)
Standard
OASIS OpenDocument Format (ODF), current version 1.4; ODF 1.2 is also ISO/IEC 26300:2015
First released
2005, as part of OASIS ODF 1.0; ISO/IEC 26300 followed in 2006
Opens with
LibreOffice Calc, Excel, Google Sheets, Collabora Online
Magic number
50 4B 03 04 ("PK"), then mimetype at byte 30 and the MIME type at byte 38
Formulas
OpenFormula, written as of:=SUM([.A1:.A3])
Sheet size
No limit in the format; LibreOffice Calc 7.4 and later: 1,048,576 rows by 16,384 columns

The basics

What is an ODS file?

ODS is the spreadsheet format of the OpenDocument Format (ODF), an open standard maintained by OASIS and also published by ISO and IEC as ISO/IEC 26300. It's the default format of LibreOffice Calc, and Excel, Google Sheets and Collabora can open and save it. Like an Excel workbook, an ODS file holds sheets of cells with values, formulas, number formats, styles, charts, filters and comments.

ODF grew out of the XML format of OpenOffice.org and was approved by OASIS in 2005. It is the same family as ODT for text documents and ODP for presentations, which share its packaging, styles and metadata. Some governments and public bodies require or prefer ODF for documents they publish or exchange, because no single vendor controls it.

Three things an ODS file is not:

  • Not an XLSX with another name. Both are ZIP packages of XML, but the XML vocabularies are different. Renaming one to the other's extension doesn't convert it.
  • Not always macro-free. ODF has no separate extension for files with macros: an .ods may contain LibreOffice Basic code. LibreOffice decides whether to run it according to its macro security setting.
  • Not plain text. A CSV or TSV holds one table of text. An ODS holds a whole workbook, and only the flat .fods variant is readable in a text editor.

Anatomy

What's inside an ODS file

An ODS file is a ZIP archive. The smallest useful one needs only three files: mimetype, a manifest that lists the package's contents, and content.xml with the cells. This is sample-minimal.ods from the samples below, part by part.

sample-minimal.ods (file list, first bytes, content.xml)
$ unzip -lv sample-minimal.ods
 Length  Method   Name
     46  Stored   mimetype
    398  Defl:N   META-INF/manifest.xml
   1891  Defl:N   content.xml

Offset 0:   50 4B 03 04   "PK", a ZIP local file header
Offset 30:  mimetype
Offset 38:  application/vnd.oasis.opendocument.spreadsheet

content.xml:
<office:document-content office:version="1.3">
 <office:body>
  <office:spreadsheet>
   <table:table table:name="Sheet1">
    <table:table-column table:number-columns-repeated="2"/>
    …
    <table:table-row>
     <table:table-cell office:value-type="string"><text:p>Mug</text:p></table:table-cell>
     <table:table-cell office:value-type="float" office:value="12.5">
      <text:p>12.5</text:p></table:table-cell>
    </table:table-row>
    …
    <table:table-row>
     <table:table-cell office:value-type="string"><text:p>Total</text:p></table:table-cell>
     <table:table-cell table:formula="of:=SUM([.B2:.B3])"
       office:value-type="float" office:value="22.49"><text:p>22.49</text:p></table:table-cell>
    </table:table-row>
    <table:table-row>
     <table:table-cell office:value-type="string"><text:p>Updated</text:p></table:table-cell>
     <table:table-cell office:value-type="date"
       office:date-value="2026-10-27"><text:p>2026-10-27</text:p></table:table-cell>
    </table:table-row>
   </table:table>
  </office:spreadsheet>
 </office:body>
</office:document-content>
  1. 150 4B 03 04

    The ZIP signature

    Every ODS starts like any ZIP file, so tools that only look at the first four bytes report it as a ZIP archive, just as they do for XLSX.

  2. 2mimetype (Stored)

    The mimetype file

    The standard says it must be the first file in the archive, uncompressed and with no extra header field. That puts its name at byte 30 and its content at byte 38 of every ODS, so a program can identify the file from a fixed position without unzipping anything.

  3. 3META-INF/manifest.xml

    The manifest

    Lists every file in the package with its media type. In a password-protected file it also holds, for each file, the encryption settings needed to decrypt it.

  4. 4<table:table table:name="Sheet1">

    A sheet

    All sheets of the workbook sit one after the other in content.xml, unlike XLSX, which stores each sheet as a separate file.

  5. 5table:number-columns-repeated="2"

    Repeated columns and cells

    Identical neighbouring columns, rows and cells are written once with a repeat count. A reader that ignores the count puts every later cell in the wrong place.

  6. 6<table:table-cell office:value-type="string">

    A text cell

    The text is written inside the cell as a paragraph, <text:p>. There is no shared table of strings as in XLSX.

  7. 7office:value-type="float" office:value="12.5"

    A number

    The value is in an attribute, and the displayed text, formatted as the user sees it, is in <text:p>. A program that can't apply number formats can still show the text.

  8. 8table:formula="of:=SUM([.B2:.B3])"

    A formula and its result

    of: names the OpenFormula syntax. Cell references sit in square brackets and start with a dot (.B2 means B2 on this sheet); arguments are separated by semicolons. The last result is stored next to it in office:value.

  9. 9office:date-value="2026-10-27"

    A date

    Dates are stored as ISO 8601 text, not as serial day numbers as in XLSX, so code can read them without knowing a date system.

Under the hood

The parts of a typical ODS file

A workbook saved by LibreOffice Calc, such as sample-workbook.ods below, has more than the three files of the minimal one. Unzip it and you find:

FileWhat it holds
mimetypeThe MIME type as plain ASCII text. First in the archive and uncompressed.
content.xmlEvery sheet and cell, the formulas with their results, filters, conditional formatting, and the styles used only in this document.
styles.xmlNamed cell styles, number formats and page styles for printing.
meta.xmlTitle, description, keywords, author, creation and save dates, the program that saved it and counts of sheets and cells.
settings.xmlThe application's view settings: active sheet, zoom, column widths shown, print settings.
Thumbnails/thumbnail.pngA small picture of the first sheet that file managers show as a preview.
RevenueChart/ (any name)An embedded chart. It's a small ODF document of its own, with its own content.xml, and LibreOffice adds a picture of it in ObjectReplacements/ for programs that can't draw charts.
Configurations2/Empty folders LibreOffice writes for custom toolbars and menus. Harmless.
META-INF/manifest.xmlThe list of every file in the package and its type.

Look inside one yourself

Run unzip -l file.ods, or copy the file, rename the copy to .zip and open it. content.xml opens in a browser or code editor; most programs write it on one long line, so use an editor that can format XML.

Data types

How ODS stores numbers, dates and formulas

Each cell says what type of value it holds in office:value-type, and keeps the value in an attribute that matches the type. The text you see in the spreadsheet is written next to it.

TypeStored asExample from the samples
Numberoffice:valueoffice:value-type="float" office:value="12.5"
Currencyoffice:value plus a currency codeoffice:value-type="currency" office:currency="EUR" office:value="25"
PercentageThe fraction in office:valueoffice:value-type="percentage" office:value="0.343…", shown as 34.3%
DateISO 8601 text in office:date-valueoffice:date-value="2026-10-01"
TimeISO 8601 duration in office:time-valuePT14H30M00S for 14:30
Booleanoffice:boolean-valueoffice:boolean-value="true"
TextThe paragraphs inside the cell<text:p>000184</text:p>

Formulas use OpenFormula, the formula language ODF has defined since version 1.2. It differs from what you type, and from how XLSX stores formulas:

  • References are in brackets with a leading dot. [.E2] is E2 on the same sheet; [$Orders.$D$2:.$D$13] is a range on the Orders sheet. Calc shows the second one as $Orders.$D$2:$D$13, and Excel as Orders!$D$2:$D$13.
  • Arguments are separated by semicolons, whatever your locale: of:=SUMIF([…];[.A2];[…]).
  • The result is saved with the formula, so a viewer or a code library can show values without calculating.
  • Functions outside the standard carry the name of the program that added them, such as ORG.LIBREOFFICE. or COM.MICROSOFT., and other programs may not know them.

Formulas still work with serial day numbers when they calculate with dates. Calc counts from a null date, 30 December 1899 by default, so 2026-10-01 minus 2026-09-01 is 30. Only storage uses ISO dates.

Versions

ODF versions, flat ODS and templates

VersionApproved by OASISNotes
ODF 1.02005Published as ISO/IEC 26300:2006.
ODF 1.12007Mostly accessibility additions. Added to the ISO standard in 2012.
ODF 1.22011Added OpenFormula, so spreadsheet formulas finally had a standard syntax. Published as ISO/IEC 26300:2015.
ODF 1.32021Security improvements, including encryption with OpenPGP keys, plus many clarifications.
ODF 1.42025The current version. LibreOffice supports it from version 25.2.

The version a file follows is in the office:version attribute of each XML file. LibreOffice saves by default in an Extended flavour of the current version: standard ODF plus LibreOffice's own elements in separate namespaces such as calcext: and loext:, for features the standard doesn't yet cover. Our samples are ODF 1.3 Extended, from LibreOffice 24.2; the conditional formatting in sample-workbook.ods is one of those extensions.

ExtensionWhat it is
.odsThe usual zipped package.
.fodsFlat ODS: the same content as one uncompressed XML file, with the root element <office:document>. Pictures are embedded as Base64 text. Bigger, but readable and easy to compare in version control.
.otsTemplate: opening it starts a new, untitled spreadsheet based on it. MIME type application/vnd.oasis.opendocument.spreadsheet-template.
.sxcThe OpenOffice.org 1.x format that ODS replaced. LibreOffice still opens it.

Comparison

ODS vs XLSX

ODSXLSX
StandardOASIS ODF; ISO/IEC 26300ECMA-376; ISO/IEC 29500
Default inLibreOffice CalcExcel
PackageZIP with mimetype first and META-INF/manifest.xmlZIP with [Content_Types].xml and _rels relationship files
Where the cells areAll sheets in one content.xmlOne XML file per sheet
Text in cellsWritten in the cellUsually in a shared strings table
DatesISO 8601 text: 2026-10-01A serial day number with a date format
Formulasof:=SUM([.A1:.A3])SUM(A1:A3), stored without the =
MacrosAllowed in the same .odsNot in .xlsx; Excel uses .xlsm
Password protectionEach file in the package encrypted separately; file names stay visibleThe whole package wrapped in an encrypted container
Single-file XML version.fodsNo

Values, formulas and basic formatting survive the trip between the two. Microsoft's own compatibility list for Excel shows where the edges are: table styles and total rows, some chart elements, pivot table styles and some named ranges are lost or changed, and Excel can't save an encrypted ODS. Going the other way, LibreOffice-only functions and features show up in Excel as errors or plain values.

Choose ODS when you work in LibreOffice, when an organisation asks for open formats, or for archiving. Choose XLSX when the people you send it to use Excel and depend on Excel-only features.

Troubleshooting

Common ODS problems and how to fix them

  • It looks different in Excel. Fonts, table styles, conditional formatting and charts don't all translate. If the layout matters more than editing, send a PDF as well.
  • #NAME? after opening in another program. The formula uses a function that program doesn't have. Check for names with an ORG.LIBREOFFICE. or COM.MICROSOFT. prefix in content.xml.
  • Dates or numbers arrive as text in code. The reader took the displayed text from <text:p> instead of office:value or office:date-value. Read the typed attribute.
  • Cells end up in the wrong columns in code. The reader ignored table:number-columns-repeated or table:number-rows-repeated. Use a maintained library rather than walking the XML by hand.
  • Large files are slow to read. All sheets sit in one XML file, and the XML is verbose: sample-1mb.ods unpacks to over 42 MB of content.xml. Python's odfpy, which pandas uses for ODS, builds the whole document in memory. For big data, export a CSV or use a streaming reader.
  • "General input/output error" in LibreOffice. The file is damaged or isn't really an ODS. A real one starts with PK and has the text mimetype near the start.

How to

How to open, edit and convert an ODS file

  • LibreOffice Calc (free for Windows, macOS and Linux) opens and saves ODS natively. Collabora Office, based on LibreOffice, does the same on phones and tablets.
  • Excel opens ODS files and saves them with File, Save As, OpenDocument Spreadsheet.
  • Google Sheets opens ODS files uploaded to Drive, and exports with File, Download, OpenDocument (.ods).
  • In a browser: browsers can't display ODS files, so a link to one downloads it.
  • With code: odfpy and pandas (read_excel(..., engine="odf")) in Python, SheetJS in JavaScript, the ODF Toolkit in Java.
  • Convert on a server: soffice --headless --convert-to xlsx file.ods, or --convert-to csv for the first sheet as CSV, or --convert-to pdf.

Security

Is an ODS file safe to open?

Because an .ods can carry macros under the same extension, you can't tell from the file name whether it does. Look for a Basic/ or Scripts/ folder inside the package. Other risks:

  • Macros. LibreOffice runs them only as its macro security level allows (Tools, Options, LibreOffice, Security, Macro Security). Keep it at High or Very High, and don't lower it for a file you didn't expect.
  • Links. Cells can link to websites, and sheets can pull data from other files and servers. LibreOffice asks before updating external links when a file opens.
  • What travels with the file. Hidden sheets, comments, author names and dates in meta.xml, and a thumbnail picture of the first sheet. LibreOffice leaves the thumbnail out of password-protected files.
  • Password protection. LibreOffice encrypts each file in the package with AES-256, using a key derived from the password. The manifest, with every file name and its unencrypted size, stays readable. LibreOffice 24.2 added an optional, experimental mode that hides more of this metadata; older versions can't open files saved that way.
  • Parsing uploads on a server. An ODS is a ZIP of XML, so it brings ZIP risks such as decompression bombs and XML risks such as XXE. Limit the decompressed size and use a maintained parser.

Free downloads

Sample ODS files to download

Free sample ODS spreadsheets for testing uploads, previews, spreadsheet libraries, converters and size limits. Each one opens in LibreOffice Calc and odfpy (the flat file in LibreOffice), and every formula is stored with its result.

sample-workbook.ods · 27.1 KBDownload

Browsers can't show this kind of file in a page. Download it to open it in the app it belongs to.

What's inside sample-workbook.ods

Browsers can't preview an ODS file, so download it and open it in LibreOffice Calc, Excel or Google Sheets. It holds the same orders as the XLSX sample workbook, so you can compare the two formats. These are the parts to look for.

  1. Orders sheet

    Twelve fictional orders with a blue header row and filter buttons, stored as a table:database-range with table:display-filter-buttons="true".

  2. Order IDs as text

    000184 and the rest are text cells, so their leading zeros survive.

  3. Dates and currency

    Dates are stored as office:date-value="2026-10-01" and shown as YYYY-MM-DD; prices are currency cells with office:currency="EUR".

  4. Formulas with results

    Each line total is of:=[.E2]*[.F2] and the totals row uses SUM. Every result is stored, so the total of €255.07 shows without recalculating.

  5. Conditional formatting

    Quantities of 5 or more use the built-in Good style. It's stored in LibreOffice's calcext: extension elements.

  6. Summary sheet and chart

    SUMIF formulas that read the Orders sheet, a percentage column, and a column chart stored as an embedded chart document in RevenueChart/.

  7. About sheet and properties

    A description of the file, and a title, description and keywords in meta.xml (File, Properties in LibreOffice).

All sample ODS files

  • Sample workbook

    sample-workbook.ods · 27.1 KB (27,717 bytes)

    Three sheets: fictional orders with dates, currency, formulas, conditional formatting and a filter; a summary with cross-sheet SUMIF formulas and a chart; and an About sheet. Saved by LibreOffice Calc 24.2 as ODF 1.3.

    • Testing spreadsheet previews, converters and libraries
    • Comparing ODS with the XLSX sample
  • Minimal ODS, three files

    sample-minimal.ods · 1014 bytes

    Written by hand with only mimetype, the manifest and content.xml: one sheet with text, numbers, a SUM formula with its result and a date. No styles, settings or metadata. It's the file in the anatomy above.

    • Parser tests: don't assume optional files exist
    • Studying the format with `unzip`
  • Flat XML version (.fods)

    sample-workbook.fods · 99.5 KB (101,854 bytes)

    The same workbook saved as Flat ODS: one XML file with <office:document> as its root. The chart is a complete document nested inside it, and the chart's preview picture is Base64 text.

    • Testing readers that support flat ODF
    • Seeing the whole format in a text editor
  • Password-protected ODS

    sample-password.ods · 20.0 KB (20,446 bytes)

    The sample workbook encrypted by LibreOffice with the password 99helpers: AES-256 with a PBKDF2-derived key for each file in the package. The file names stay visible in the manifest; the content doesn't.

    • Checking that upload scanners and indexers report encrypted files
    • Testing password prompts
  • 1 MB ODS file

    sample-1mb.ods · 1 MB (1,048,576 bytes)

    45,696 rows of fictional orders on one sheet, seven columns, padded to exactly 1,048,576 bytes (1 MiB) with spaces in meta.xml. Its content.xml unpacks to over 42 MB.

    • Upload and size-limit tests
    • Import performance and memory use

Ways to test with them

  • File type detection: all four packaged files have the MIME type at byte 38. The Unix file command reports "OpenDocument Spreadsheet" for them; a detector that says application/zip isn't reading the mimetype file.
  • Stored results: without recalculating, a reader should show 25 in Orders.G2 and 255.07 in Orders.G14 of sample-workbook.ods, and 87.5 in Summary.C2.
  • Dates: the first order date should come out as 1 October 2026 in your code, read from office:date-value.
  • Encryption: an indexer or antivirus scanner should report sample-password.ods as encrypted, not as an empty or broken spreadsheet.
  • Size limits: sample-1mb.ods is exactly 1,048,576 bytes, so you can test a limit at the boundary, and it shows how much memory your reader needs for 42 MB of XML.

Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.

Put it online

Have an ODS file? Give it a link.

Drop an OpenDocument spreadsheet on 99helpers and it gets its own web address. Browsers can't display ODS files, so visitors download it and open it in LibreOffice, Excel or Google Sheets.

Questions

ODS files, frequently asked

What is an ODS file?

A spreadsheet in the OpenDocument format, the default format of LibreOffice Calc. It's a ZIP package of XML files holding sheets, formulas, formatting and charts.

How do I open an ODS file?

With LibreOffice Calc (free), Excel, or Google Sheets after uploading it to Google Drive. On phones and tablets, Collabora Office opens it.

Can Excel open ODS files?

Yes. Excel opens and saves ODS. Values and formulas usually come through, but some formatting, chart details and table styles can change, and Excel can't save an encrypted ODS.

What's the difference between ODS and XLSX?

They do the same job with different standards. ODS is OpenDocument (OASIS, ISO/IEC 26300), the default in LibreOffice; XLSX is Office Open XML (ISO/IEC 29500), the default in Excel. Inside, they store sheets, dates and formulas differently.

How do I convert ODS to XLSX?

Open it in LibreOffice Calc and use File, Save As, Excel 2007-365 (.xlsx). Excel and Google Sheets can also open it and save or download it as XLSX. On a server: soffice --headless --convert-to xlsx file.ods.

Can an ODS file contain macros?

Yes. Unlike Excel, which uses .xlsm for workbooks with macros, ODF uses the same .ods extension. LibreOffice only runs macros its security settings allow.

How many rows can an ODS file have?

The format sets no limit. LibreOffice Calc 7.4 and later handle 1,048,576 rows and 16,384 columns per sheet, the same as Excel.

What is a .fods file?

A flat ODS: the same spreadsheet as one plain XML file instead of a ZIP package. LibreOffice opens and saves it; it's useful for version control and for reading the format.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.