Test files › Office documents › spreadsheet.ods

Sample ODS file (spreadsheet)

OpenDocument Spreadsheet with a small table and the stored-first mimetype entry.

↓ Download spreadsheet.ods
Filenamespreadsheet.ods
FormatODS
Size878 bytes (878 bytes)
MIME typeapplication/vnd.oasis.opendocument.spreadsheet
SHA-2563ceb50ee098eec9e9d27179e972e375ed504bb9262c24b1ccb3b3c02038a0525
What this file catchesThe spreadsheet counterpart of the ODT case, plus a table structure for import testing.

Handle it in code

Each snippet below was run against this exact file with Python 3.14.4 and Node 24.15.0 when this page was built, and the output shown is what it printed.

Python

Check for macros before accepting or opening an Office upload. Modern files are ZIPs: VBA lives in vbaProject.bin (Microsoft) or a Basic folder (OpenDocument). Legacy .xls/.doc files are OLE2 containers that need a dedicated parser, such as oletools, to see inside.

import zipfile

OLE2 = bytes.fromhex("d0cf11e0a1b11ae1")

with open("spreadsheet.ods", "rb") as f:
    magic = f.read(8)
if magic == OLE2:
    print("legacy OLE2 file (.xls, .doc, .ppt, .msg): may carry VBA; inspect it with an OLE parser")
elif not zipfile.is_zipfile("spreadsheet.ods"):
    print("not an Office file")
else:
    with zipfile.ZipFile("spreadsheet.ods") as z:
        names = z.namelist()
        types = z.read("[Content_Types].xml").decode() if "[Content_Types].xml" in names else ""
    macros = [n for n in names if n.lower().endswith("vbaproject.bin") or n.startswith(("Basic/", "Scripts/"))]
    if macros or "macroEnabled" in types:
        print("contains macros:", ", ".join(macros) or "declared in [Content_Types].xml")
    else:
        print(f"no macro parts among {len(names)} entries")

Run against this file, it prints: no macro parts among 3 entries

Related guides and tools

Sample XLS and XLSX (Excel) filesFile signaturesMIME typesCheck a file's real typeVerify its SHA-256

Download & verify

curl -fsSL -o "spreadsheet.ods" "https://files.hexaqa.com/office/spreadsheet.ods"
curl -fsSL "https://files.hexaqa.com/office/spreadsheet.ods" | sha256sum # expect: 3ceb50ee098eec9e9d27179e972e375ed504bb9262c24b1ccb3b3c02038a0525

More office documents test files

legacy-workbook.xlsmacro-enabled.xlsmpresentation.odppresentation.pptxspreadsheet.xlsxcorrupt-missing-content-types.docxdocument.docxdocument.odt

← All Office documents files