Sample XLS and XLSX (Excel) files — free download
Real spreadsheets, not renamed CSVs. A genuine ZIP-of-XML .xlsx that opens in Excel, LibreOffice and openpyxl, a macro-enabled .xlsm, an OpenDocument .ods, and a legacy .xls written as BIFF8 records inside an OLE2 compound file.
5 ready-made Excel test files
| File | Size | What it catches | |
|---|---|---|---|
| spreadsheet.ods | 840 bytes | The spreadsheet counterpart of the ODT case, plus a table structure for import testing. | download |
| spreadsheet.xlsx | 1.7 KB | A minimal but valid XLSX built from source as a ZIP of XML parts. Opens in the corresponding application; use it to exercise upload, parsing and preview without shipping a real document. The formula cell (with a cached value) catches importers that read <v> but ignore <f>, or vice versa. | download |
| formula-injection.xlsx | 1.7 KB | The XLSX cousin of CSV formula injection. When an app re-exports these cells to CSV, or a spreadsheet opens them, the payloads (all inert - a harmless calculation and a link) can execute. Confirm your export path escapes them. | download |
| macro-enabled.xlsm | 1.8 KB | Upload policies that must treat .xlsm differently from .xlsx because it can carry macros. The vbaProject.bin here is a harmless text placeholder, but the container is a genuine macro-enabled package your scanner should flag. | download |
| legacy-workbook.xls | 3.5 KB | Code that treats .xls and .xlsx as the same thing. They share nothing structurally - .xlsx is a ZIP of XML starting with PK, .xls is an OLE2 compound document starting with D0 CF 11 E0, and a reader for one cannot open the other. Also catches importers that only accept the modern format, and signature checks that map the OLE2 magic to Word. Opens in Excel, LibreOffice, xlrd and pandas. | download |
Every file is generated from source — no third-party copyright — and each has its own page with a published SHA-256 you can verify after download.
Questions
Where can I download a sample Excel file?
The XLSX below is a real workbook containing a live formula, so it exercises formula parsing as well as file reading.
Where can I download a sample .xls file (Excel 97-2003)?
The .xls below is a genuine legacy workbook with two sheets, numeric cells and text held in a shared string table. It opens in Excel, LibreOffice, xlrd and pandas.
What is the difference between .xls and .xlsx?
They have nothing structurally in common. An .xlsx is a ZIP archive of XML parts and begins with the bytes PK; an .xls is an OLE2 compound document, a small filesystem inside one file, and begins D0 CF 11 E0. A library that reads one will not read the other, and a signature check that maps the OLE2 magic straight to Word will mislabel every .xls.
What is the correct MIME type for XLSX?
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet — about 70 characters, and a very common source of typos. See the MIME types reference.
Do you have a macro-enabled workbook?
Yes, an .xlsm. Many upload filters block .xlsm specifically, so it is useful for verifying that your allow-list behaves as intended.