Free FODS test files and sample generator
A LibreOffice Calc spreadsheet as a single flat XML file. Generate valid .fods sample files for testing XML pipelines, converters and text-diffable spreadsheets.
What is a .fods file?
FODS: Flat OpenDocument Spreadsheet. Flat ODS is a spreadsheet as a single uncompressed XML file, the same content as .ods without the ZIP container, so it can be diffed and edited as text.
Why generate a test FODS file?
- Test text-diffable spreadsheet storage in version control.
- Exercise an XML transform over spreadsheet content directly.
- Verify a reader accepts flat ODF as well as packaged.
What you can put inside a .fods file
You get 3 content options for FODS, so the file holds something meaningful rather than random padding: Numeric table, Text table, Mixed table. For FODS these are alternatives, so choose the one that matches what you need to test.
How a .fods file is identified
A .fods file has no signature at the start. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.
How the size lands on the exact byte
XML permits whitespace after the root element, so the padding goes there. The document still parses, and the tree is unchanged.
Negative testing with broken FODS files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed. Same length as the valid file.
- Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation.
Sample FODS content
<office:document office:mimetype="application/vnd.oasis.opendocument.spreadsheet"> <office:body><office:spreadsheet>…</office:spreadsheet></office:body> </office:document>
This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Open in LibreOffice Calc, or process as XML with `xmllint` / XSLT.
Media type application/vnd.oasis.opendocument.spreadsheet-flat-xml · extension .fods · category Data
Generate a .fods file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about FODS files
What identifies a .fods file?
Nothing at the start of the file does. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.
How can a .fods file be an exact number of bytes?
XML permits whitespace after the root element, so the padding goes there. The document still parses, and the tree is unchanged.
What can go inside the FODS file?
There are 3 content options for .fods: Numeric table, Text table, Mixed table. For FODS these are alternatives, so pick the one matching what you need to test.
Can I download several broken FODS files at once?
Yes, select more than one File Condition and you get one ZIP containing a .fods per condition, each named after its condition.
Can the FODS file use UTF-16 or a byte-order mark?
No, and deliberately. A .fods file is a container rather than plain text, so rewriting its bytes as UTF-16 would not produce a UTF-16 document. It would produce a broken file. Use a text format such as CSV, JSON or XML for encoding tests.
How do I open or verify the FODS file?
Open in LibreOffice Calc, or process as XML with xmllint / XSLT.