Free XLS test files and sample generator

The legacy binary Microsoft Excel workbook format used by older systems and integrations.

Generate a .xls file →

What is a .xls file?

XLS: Excel 97–2003 Spreadsheet. The legacy Excel 97-2003 workbook is a binary OLE2 compound file containing BIFF records, a completely different format from XLSX despite the shared application. Plenty of enterprise systems still emit it, so importers must handle both.

Why generate a test XLS file?

What you can put inside a .xls file

You get 3 content options for XLS, so the file holds something meaningful rather than random padding: Numeric table, Text table, Mixed table. For XLS these are alternatives, so choose the one that matches what you need to test.

How a .xls file is identified

Every .xls file begins with D0 CF 11 E0 A1 B1 1A E1, an OLE2 compound file, the container legacy Office formats share. That is what a validator inspecting content rather than the file name looks for.

How the size lands on the exact byte

A compound file is built from 512-byte sectors, so the size is a multiple of 512 and every preset lands exactly.

Negative testing with broken XLS files

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 XLS content

[Excel 97–2003], Sheet1: id | name | amount

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 Excel or LibreOffice Calc, or read with `pandas.read_excel(path)` (needs the xlrd engine).

Media type application/vnd.ms-excel · extension .xls · category Data

Generate a .xls file → · questions about sizes, privacy or cost are answered on the site FAQ.

Frequently asked questions about XLS files

What identifies a .xls file?

A .xls file begins with the bytes D0 CF 11 E0 A1 B1 1A E1, an OLE2 compound file, the container legacy Office formats share. Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.

How can a .xls file be an exact number of bytes?

A compound file is built from 512-byte sectors, so the size is a multiple of 512 and every preset lands exactly.

What can go inside the XLS file?

There are 3 content options for .xls: Numeric table, Text table, Mixed table. For XLS these are alternatives, so pick the one matching what you need to test.

Can I download several broken XLS files at once?

Yes, select more than one File Condition and you get one ZIP containing a .xls per condition, each named after its condition.

Can the XLS file use UTF-16 or a byte-order mark?

No, and deliberately. A .xls 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 XLS file?

Open in Excel or LibreOffice Calc, or read with pandas.read_excel(path) (needs the xlrd engine).

Related Data formats

CSV · JSON · XLSX · XML · SQL · TSV · YAML · JSONL

Browse all file formats →