Skip to content
OneKitly

The .ods File That Is Valid, and That Your Reader Refuses

Published 9/15/2026 · 4 min read · File tools

Daniel Okonkwo

Daniel OkonkwoFront-end developer and tech writer at OneKitly

Web performance · File formats

Checked against 3 sources

View profile
In short

An .ods is a zip archive holding a handful of XML files. The specification requires very few of them: a mimetype, a manifest and a content.xml are enough for a valid spreadsheet document, and styles.xml is explicitly optional. Minimal exporters take the specification at its word — scripts, generators and several online converters write exactly those three entries and stop. Some readers then refuse the document outright, reporting that they cannot find styles.xml, which reads like a corruption message and is not one: the file is right and the reader is strict. The fix here is to give the reader what it asks for without touching what it came for. When a workbook fails to open, the bytes are checked for a zip signature, unzipped, and if content.xml is present while styles.xml is absent, a minimal but valid styles.xml is added and the archive is read again. It adds no styling — three empty containers satisfy the requirement. The repair is attempted once, and if it fails the original error is raised rather than replaced, because hiding "file is encrypted" behind "incomplete ODS" sends you looking in the wrong place.

OpenDocument makes styles.xml optional. Several readers demand it and reject the whole document without it — "Cannot find file styles.xml in zip" on a file that is not broken.

Optional in a specification is not optional in practice

This is a recurring shape in file formats and worth recognising when you meet it elsewhere. A specification says a part may be omitted; the reference implementation always writes it; every reader is then tested against files that always contain it; and the optionality quietly becomes theoretical. The first file that exercises it is reported as corrupt. The honest response is to accept it — the file satisfies the standard — while writing the missing part when producing one, because a document that only some readers open is worse than one with three empty style containers nobody looks at.

Which format to hand over

ODS when the person on the other end uses LibreOffice or Collabora, when an administration asks for an open format, or when the file is going into an archive where a documented specification matters more than which program is fashionable. XLSX when the recipient uses Excel or a corporate pipeline built around it, which is most of the time. Both hold the same things for ordinary tables — cells, sheets, formulas, number formats — and both are zip archives of XML, so neither is the more open in any meaningful sense today. Where they diverge is at the edges: pivot tables, macros and the more exotic chart types survive their own format and not the other one.

What is inside an .ods, and what is required
Entry in the zipHoldsRequired by the spec
mimetypeThe document's type, uncompressed and firstYes
META-INF/manifest.xmlThe list of the other entriesYes
content.xmlThe cells, the sheets, the valuesYes
styles.xmlFonts, borders, page setupNo — and this is the one that gets demanded
meta.xml, settings.xmlAuthor, dates, window positionsNo
XLSX to ODSConvert an Excel workbook to OpenDocument .ods for LibreOffice Calc.Try the tool

Frequently asked questions

Does the repair change my data?
No. It adds one entry to the archive and leaves every other entry byte for byte as it was — content.xml, the manifest and the mimetype are untouched. The added file declares three empty containers and no style at all, so nothing about how the document looks is being decided for you. It also happens only in memory, on the copy being read; the file on your disk is not modified.
My .ods still will not open. What else could it be?
The original error is the one to read, and it is deliberately not replaced by the repair attempt. The usual causes are a password-protected document, a file that is not a zip at all — a renamed .xls, or a download that saved an HTML error page under the right extension — and a truncated transfer. Checking the size against the source is the fastest of those to rule out.
Can I open an .ods and save it back as .ods?
Yes, and that is one way to make a minimal file readable everywhere: read it here and write it out again, and the result carries the parts a strict reader expects. Bear in mind that a round trip through any converter keeps the cells and drops most of the presentation — a rewritten file is a clean table, not a copy of your document.

Articles you may find interesting

All guides
ExplainerThe Workbook with Twenty-Three Formulas That Reported NoneA cell can hold a formula and no cached result. A reader that skips empty cells throws the formula away with them — and says the file has none. One parsing option separates the two cases.ExplainerConverting Formulas to Values Keeps the Cached Answer, Not the CalculationA spreadsheet file stores both the formula and the last answer Excel computed. Stripping the formula leaves the stored answer — and leaves a blank wherever the file never carried one.How-toOne File per Tab, and What a Split Leaves BehindSplitting a workbook writes one .xlsx per sheet, named after the tab. It carries the values across and not the formulas — which is the right default when the point is to send one department its own tab.ComparisonA Column Called "Total (EUR)" Cannot Be an XML Element NameJSON takes your header text as a key exactly as written. XML cannot — its names may not hold spaces, parentheses or a leading digit — so they are normalised, and knowing how prevents a surprise downstream.ExplainerA Cell of Three Spaces Counts as Empty, and That Is the PointWhitespace is the whole reason these tools exist. A row of blanks looks empty, is not empty to a strict test, and quietly survives every filter you apply after it.How-toMerging Workbooks: One Sheet Each, or One Table for AllTwelve monthly reports can become twelve tabs or one table of twelve months. Only the second can be sorted and summed in one go — and it is the one where the header rows need handling.

Related tools

Sources

Spotted a mistake in this article?