Which MIME types are related to file extension ".xltm"?
The .xltm file extension is associated with 2 MIME types:
application/vnd.ms-excel.template.macroenabled.12, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
About .xltm Files
XLTM files are Excel template files that support macros. They are built on the Office Open XML standard and are designed to create new spreadsheets with preconfigured setups.
- Main use case: To serve as a base for creating Excel workbooks with custom layouts, formulas, and automated tasks using macros.
- MIME type info: They use the MIME type application/vnd.ms-excel.template.macroenabled.12, which specifies that the file is a macro-enabled template.
- Structure similarity: They share structural features with macro-free files (like those under application/vnd.openxmlformats-officedocument.spreadsheetml.sheet), but with added macro functionality.
- Software support: Applications like Microsoft Excel, LibreOffice Calc, and similar programs can open, view, and edit these files.
Relationship between file extension and MIME type
A file extension is a suffix at the end of a filename that indicates what type of file it is. File extensions help both users and operating systems identify what application should be used to open the file.
File extensions are typically separated from the filename by a period (dot) and consist of 2-4 characters, though they can be longer. For example, in the filename "document.pdf", ".pdf" is the file extension.
File extensions are closely related to MIME types, as they both serve to identify the format of a file. However, while MIME types are used primarily by web browsers and servers, file extensions are used by operating systems and applications.
Associated MIME types
application/vnd.ms-excel.template.macroenabled.12, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
FAQs
What is an XLTM file?
An XLTM file is a Microsoft Excel Macro-Enabled Template. It serves as a blueprint for creating new workbooks that include pre-defined layouts, formulas, and Visual Basic for Applications (VBA) macros. It is based on the Office Open XML format introduced in Microsoft Office 2007.
How do I open an XLTM file for editing?
If you double-click an XLTM file, Excel usually creates a new workbook based on the template rather than opening the template itself. To edit the actual XLTM file, open Excel, go to File > Open, and select the file directly. Alternatively, you can right-click the file in Windows and select Open instead of New.
Are XLTM files safe to open?
Because XLTM files contain macros, they can theoretically carry malware or viruses written in VBA code. You should only open these files and click Enable Content if you trust the source. Excel's security settings usually block macros by default until you grant permission.
What is the difference between XLTM and XLTX?
The primary difference is macro support. XLTX files are standard Excel templates that cannot store VBA code, making them safer but less functional for automation. XLTM files use the MIME type application/vnd.ms-excel.template.macroenabled.12 and are specifically designed to include macros.
Can I open XLTM files without Microsoft Excel?
Yes, you can use alternatives like LibreOffice Calc, WPS Office, or Google Sheets. However, while the spreadsheet data and formatting usually load correctly, the VBA macros often fail to run because these programs use different scripting engines or do not support Excel's specific macro language.
How do I convert an XLTM file to a standard XLSX workbook?
Open the template in Excel and select File > Save As. Choose Excel Workbook (*.xlsx) from the file type dropdown menu. Be aware that saving as a standard XLSX file (associated with application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) will remove all macros from the document.
What is the correct MIME type for serving XLTM files?
The specific MIME type for XLTM files is application/vnd.ms-excel.template.macroenabled.12. When configuring a web server, ensuring this MIME type is set correctly ensures that browsers recognize the file as a macro-enabled template rather than a generic binary file.
General FAQ
What is a MIME type?
A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.
MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.
MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.
How do I find the MIME type for a file?
You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.
Why can one extension have multiple MIME types?
Different programs and historical usage may assign various MIME identifiers to the same file format. Listing them together helps maintain compatibility across tools.