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
.odsmay 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
.fodsvariant 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.
$ 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
50 4B 03 04The 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
mimetype (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
META-INF/manifest.xmlThe 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
<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
table: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
<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
office: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
table: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 (.B2means B2 on this sheet); arguments are separated by semicolons. The last result is stored next to it inoffice:value. - 9
office: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:
| File | What it holds |
|---|---|
mimetype | The MIME type as plain ASCII text. First in the archive and uncompressed. |
content.xml | Every sheet and cell, the formulas with their results, filters, conditional formatting, and the styles used only in this document. |
styles.xml | Named cell styles, number formats and page styles for printing. |
meta.xml | Title, description, keywords, author, creation and save dates, the program that saved it and counts of sheets and cells. |
settings.xml | The application's view settings: active sheet, zoom, column widths shown, print settings. |
Thumbnails/thumbnail.png | A 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.xml | The 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.
| Type | Stored as | Example from the samples |
|---|---|---|
| Number | office:value | office:value-type="float" office:value="12.5" |
| Currency | office:value plus a currency code | office:value-type="currency" office:currency="EUR" office:value="25" |
| Percentage | The fraction in office:value | office:value-type="percentage" office:value="0.343…", shown as 34.3% |
| Date | ISO 8601 text in office:date-value | office:date-value="2026-10-01" |
| Time | ISO 8601 duration in office:time-value | PT14H30M00S for 14:30 |
| Boolean | office:boolean-value | office:boolean-value="true" |
| Text | The 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 asOrders!$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.orCOM.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
| Version | Approved by OASIS | Notes |
|---|---|---|
| ODF 1.0 | 2005 | Published as ISO/IEC 26300:2006. |
| ODF 1.1 | 2007 | Mostly accessibility additions. Added to the ISO standard in 2012. |
| ODF 1.2 | 2011 | Added OpenFormula, so spreadsheet formulas finally had a standard syntax. Published as ISO/IEC 26300:2015. |
| ODF 1.3 | 2021 | Security improvements, including encryption with OpenPGP keys, plus many clarifications. |
| ODF 1.4 | 2025 | The 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.
| Extension | What it is |
|---|---|
.ods | The usual zipped package. |
.fods | Flat 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. |
.ots | Template: opening it starts a new, untitled spreadsheet based on it. MIME type application/vnd.oasis.opendocument.spreadsheet-template. |
.sxc | The OpenOffice.org 1.x format that ODS replaced. LibreOffice still opens it. |
Comparison
ODS vs XLSX
| ODS | XLSX | |
|---|---|---|
| Standard | OASIS ODF; ISO/IEC 26300 | ECMA-376; ISO/IEC 29500 |
| Default in | LibreOffice Calc | Excel |
| Package | ZIP with mimetype first and META-INF/manifest.xml | ZIP with [Content_Types].xml and _rels relationship files |
| Where the cells are | All sheets in one content.xml | One XML file per sheet |
| Text in cells | Written in the cell | Usually in a shared strings table |
| Dates | ISO 8601 text: 2026-10-01 | A serial day number with a date format |
| Formulas | of:=SUM([.A1:.A3]) | SUM(A1:A3), stored without the = |
| Macros | Allowed in the same .ods | Not in .xlsx; Excel uses .xlsm |
| Password protection | Each file in the package encrypted separately; file names stay visible | The whole package wrapped in an encrypted container |
| Single-file XML version | .fods | No |
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 anORG.LIBREOFFICE.orCOM.MICROSOFT.prefix incontent.xml.- Dates or numbers arrive as text in code. The reader took the displayed text from
<text:p>instead ofoffice:valueoroffice:date-value. Read the typed attribute. - Cells end up in the wrong columns in code. The reader ignored
table:number-columns-repeatedortable: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.odsunpacks to over 42 MB ofcontent.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
PKand has the textmimetypenear 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 csvfor 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.
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.
Orders sheet
Twelve fictional orders with a blue header row and filter buttons, stored as a
table:database-rangewithtable:display-filter-buttons="true".Order IDs as text
000184and the rest are text cells, so their leading zeros survive.Dates and currency
Dates are stored as
office:date-value="2026-10-01"and shown asYYYY-MM-DD; prices are currency cells withoffice:currency="EUR".Formulas with results
Each line total is
of:=[.E2]*[.F2]and the totals row usesSUM. Every result is stored, so the total of €255.07 shows without recalculating.Conditional formatting
Quantities of 5 or more use the built-in Good style. It's stored in LibreOffice's
calcext:extension elements.Summary sheet and chart
SUMIFformulas that read the Orders sheet, a percentage column, and a column chart stored as an embedded chart document inRevenueChart/.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
SUMIFformulas 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 andcontent.xml: one sheet with text, numbers, aSUMformula 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. Itscontent.xmlunpacks 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
filecommand reports "OpenDocument Spreadsheet" for them; a detector that saysapplication/zipisn't reading themimetypefile. - Stored results: without recalculating, a reader should show
25in Orders.G2 and255.07in Orders.G14 ofsample-workbook.ods, and87.5in 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.odsas encrypted, not as an empty or broken spreadsheet. - Size limits:
sample-1mb.odsis 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
- OASIS: OpenDocument Format v1.4, Part 1: Introduction
- OASIS: OpenDocument Format v1.4, Part 2: Packages
- IANA media type registration for ODS
- Library of Congress: OpenDocument Format (ODF) family
- Microsoft: Differences between the ODS and Excel XLSX formats
- LibreOffice 7.4 release notes (16,384 columns)
Last reviewed 27 October 2026.