There are already MIME types for ‘.xls’ and ‘.xlb’ within the type_map dictionary in the mimetype library. Why don’t we add the other excel formats??
.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template
.xlsm application/vnd.ms-excel.sheet.macroEnabled.12
.xltm application/vnd.ms-excel.template.macroEnabled.12
.xlam application/vnd.ms-excel.addin.macroEnabled.12
.xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12
Which operating system (OS) and version are you using?
On linux for example the mime types are loaded from OS files.
When I work in docker containers I have to manually add them most of the time.
hugovk
(Hugo van Kemenade)
July 25, 2025, 7:57am
4
I added about 50 MIME types to Python 3.14, including for .docx , .pptx and .xlsx, but not those other .xl** ones:
Editor, Hugo van Kemenade,. This article explains the new features in Python 3.14, compared to 3.13. For full details, see the changelog. Summary – release highlights: Python 3.14 beta is the pre-r...
The .***x ones are defined in ECMA-376, are the .xl** defined there too, or in another standard? (I’m on mobile right now, so it’s hard to search zipped PDFs.)
3 Likes
I found them in the official office documentation, but will checkout those ECMA files to give you a better answer.