The basics
What is an XLTX file?
An XLTX file is an Excel template: a workbook set up to be copied. Invoices, budgets, timesheets, expense claims and report layouts are often shared as templates. Opening one doesn't open the file itself. Excel creates a new, unsaved workbook named after the template with a number added, such as invoice1, with a copy of the template's sheets, formulas, number formats, styles, validation rules and print settings. Save that, and the template stays clean for next time.
Inside, an XLTX is built exactly like an XLSX: XML parts in a ZIP package, defined by the Office Open XML standard (ECMA-376, ISO/IEC 29500). Excel has used it for templates since Excel 2007; before that, templates were binary XLT files.
- It's a starting point, not a workbook to fill in. To change the template itself, you open it from inside Excel.
- It can't contain macros. A template with VBA code must be saved as XLTM, and workbooks made from that inherit the code.
- Excel's blank workbooks can come from a template too: a file called
Book.xltxin the XLStart folder, explained below.
Anatomy
What's inside an XLTX file
An XLTX is an XLSX package with one difference. Our sample-minimal.xltx has only the five parts a workbook needs, written by hand; here they are, part by part.
$ unzip -l sample-minimal.xltx
Length Date Time Name
--------- ---------- ----- ----
561 2026-10-27 12:00 [Content_Types].xml
296 2026-10-27 12:00 _rels/.rels
284 2026-10-27 12:00 xl/workbook.xml
297 2026-10-27 12:00 xl/_rels/workbook.xml.rels
495 2026-10-27 12:00 xl/worksheets/sheet1.xml
First 4 bytes: 50 4b 03 04 (PK..)
[Content_Types].xml, the two Overrides:
<Override PartName="/xl/workbook.xml"
ContentType="application/vnd.openxmlformats-officedocument
.spreadsheetml.template.main+xml"/>
<Override PartName="/xl/worksheets/sheet1.xml"
ContentType="application/vnd.openxmlformats-officedocument
.spreadsheetml.worksheet+xml"/>
xl/workbook.xml:
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
<sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets>
</workbook>
xl/worksheets/sheet1.xml, the cells:
<row r="1">
<c r="A1" t="inlineStr"><is><t>Item</t></is></c>
<c r="B1" t="inlineStr"><is><t>Amount</t></is></c>
</row>
<row r="2">
<c r="A2" t="inlineStr"><is><t>Sample XLTX from 99helpers.com/file-types/xltx</t></is></c>
</row>
<row r="4">
<c r="A4" t="inlineStr"><is><t>Total</t></is></c>
<c r="B4"><f>SUM(B2:B3)</f><v>0</v></c>
</row>- 1
50 4b 03 04The ZIP signature
The same first bytes as every XLSX and ZIP file. A tool that only reads them can't tell a template from a workbook.
- 2
[Content_Types].xmlThe content types
Gives the type of each part. It's the only place where a template and a workbook differ.
- 3
…spreadsheetml.template.main+xmlThe template content type
For the main part,
xl/workbook.xml. An XLSX says…spreadsheetml.sheet.main+xmlhere, and an XLTMapplication/vnd.ms-excel.template.macroEnabled.main+xml. - 4
…spreadsheetml.worksheet+xmlThe sheets' content type
Unchanged: worksheets, styles and shared strings have the same types in a template as in a workbook.
- 5
_rels/.relsThe package relationships
Point to
xl/workbook.xmlwith the ordinaryofficeDocumentrelationship. There's no separate relationship for templates. - 6
<sheet name="Sheet1" … r:id="rId1"/>The sheet list
The sheets every new workbook starts with, in order.
xl/_rels/workbook.xml.relsmapsrId1to the sheet's part. - 7
<c r="A1" t="inlineStr">Text cells
Headings typed straight into the cell as inline strings. Excel itself usually stores text in a shared strings part instead; both are valid.
- 8
<f>SUM(B2:B3)</f><v>0</v>A formula with its result
The formula and its cached result, 0 for an empty template. New workbooks inherit the formula and recalculate as data goes in.
Under the hood
What makes an XLTX different from an XLSX
One line: the content type of xl/workbook.xml in [Content_Types].xml. Our sample-invoice.xltx and sample-invoice.xlsx were saved by LibreOffice from the same invoice, and every other part in the two packages is byte-for-byte identical.
| File | Content type of xl/workbook.xml |
|---|---|
.xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml |
.xltx | application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml |
.xlsm | application/vnd.ms-excel.sheet.macroEnabled.main+xml |
.xltm | application/vnd.ms-excel.template.macroEnabled.main+xml |
- Renaming isn't converting. It changes the name but not the content type, and apps that read the package follow the content type: in our tests, LibreOffice opened
sample-invoice.xltxrenamed to.xlsxas a new untitled workbook. Use Save As to switch. - Libraries carry the flag over. openpyxl 3.1 reads the content type into
wb.template. Load an XLTX and save it asreport.xlsx, and the file keeps the template content type unless you setwb.template = Falsefirst. Set it toTrueto write a template. - The
filecommand calls both samples "Microsoft Excel 2007+". Check the content type to tell them apart.
In Excel
How templates work in Excel: Personal templates, Book.xltx and XLStart
- Save a template: File, Save As (or File, Export, Change File Type) and choose **Excel Template (*.xltx), or Excel Macro-Enabled Template (*.xltm)** if the workbook has macros.
- Where it goes: your personal templates folder, usually
C:\Users\<user name>\Documents\Custom Office Templateson Windows. Set it once under File, Options, Save, Default personal templates location. - Use it: File, New, Personal, and double-click the template. Double-clicking the
.xltxin File Explorer or Finder also creates a new workbook. - Edit it: in Excel, File, Open the
.xltxitself. The title bar shows the template's file name instead ofinvoice1.
Excel also uses templates for its own blank workbooks and sheets. According to Microsoft:
| Save as an Excel template named | In the XLStart (or alternate startup) folder | Effect |
|---|---|---|
Book | Book.xltx | Every new blank workbook starts from it |
Sheet | Sheet.xltx | Every sheet you insert starts from it |
Excel's Trust Center (Trusted Locations) shows where the XLStart folder is. Files placed there also open automatically when Excel starts, which is why the folder is worth checking if Excel does something unexpected at startup; the XLTM page covers macros there.
Template design
What makes a good Excel template
Our sample-invoice.xltx shows the usual techniques. Each is stored in the file and copied into every workbook made from it:
- Input cells that stand out, with a fill colour, and unlocked (Format Cells, Protection) so that sheet protection, switched on without a password, stops formulas being typed over.
- Formulas that stay blank until there's data, such as
=IF(OR(B14="",C14=""),"",B14*C14), so an empty template doesn't show rows of zeros. - Number formats for currency, percentages and dates, so values typed in look right straight away.
- Data validation with input messages: a date in the date cell, a VAT rate between 0% and 50%.
- Defined names such as
InvoiceTotal, which other formulas and reports can refer to. - Print settings: paper size, print area, fit to one page wide, a footer with page numbers.
- Careful with
TODAY(): it recalculates every time the workbook opens, so an invoice date made with it changes later. Use an input cell, or type Ctrl+; to enter today's date as a fixed value.
Comparison
XLTX vs XLTM, XLT, XLSX and OTS
| Extension | What it is | Structure | Macros |
|---|---|---|---|
.xltx | Excel template | ZIP of XML | No |
| `.xltm` | Excel macro-enabled template | ZIP of XML, plus a VBA project | Yes; copied into new workbooks |
| `.xlt` | Excel 97-2003 template | BIFF8 records in an OLE2 file | Yes, same extension |
| `.xlsx` | Excel workbook | ZIP of XML | No |
.ots | OpenDocument spreadsheet template (LibreOffice) | ZIP of XML | Yes, same extension |
Choose XLTX unless the template needs code: workbooks made from it are plain XLSX files, which open without macro warnings. Keep XLT only for people on Excel 2003 or older; it is limited to 65,536 rows and 256 columns.
How to
How to open, make and convert an XLTX file
- Template to workbook: open the template (which creates
invoice1) and save it as Excel Workbook (*.xlsx). - Workbook to template: File, Save As, **Excel Template (*.xltx)**.
- LibreOffice Calc opens an XLTX as a new untitled spreadsheet and saves one with File, Save As, Excel 2007–365 Template. On a server:
soffice --headless --convert-to 'xltx:Calc MS Excel 2007 XML Template' invoice.xlsx, andsoffice --headless --convert-to xlsx invoice.xltxback. - Google Sheets converts an uploaded XLTX into an ordinary Google Sheet. Work and school accounts can submit a spreadsheet to their organisation's template gallery, if the administrator allows it.
- In code: openpyxl reads and writes XLTX; see the
wb.templateflag above. Most libraries read the cached formula results and don't calculate. - In a browser: browsers can't display XLTX files, so a link to one downloads it.
Troubleshooting
Common XLTX problems and how to fix them
- I filled in the template itself. It was opened with File, Open, which edits the template. Close without saving, or restore the template from a copy, and create workbooks with File, New, Personal or a double-click.
- Double-clicking opens a copy, so I can't change the template. That's by design: use File, Open in Excel.
- My template isn't under Personal. It isn't in the folder Excel lists. Move it to
Custom Office Templates, or set Default personal templates location under File, Options, Save. - Book.xltx isn't used for new workbooks. The name must be exactly
Bookwith the Excel Template type, in the XLStart folder or the alternate startup folder set under File, Options, Advanced. Check the extension isn't hidden, as inBook.xltx.xlsx. - My code saved an
.xlsxthat is really a template. openpyxl keeps the template content type of a loaded XLTX whilewb.templateisTrue; set it toFalsebefore saving a workbook. - Dates in the new workbook show as numbers. The cell lost its date format, or a library read the raw serial number. See how XLSX stores dates.
- It downloads as a ZIP. The server sends
application/zip. Serve.xltxwith the MIME type above.
Security
Is an XLTX file safe to open?
An XLTX can't hold VBA macros, so it doesn't carry the main spreadsheet malware risk. What it does hold is copied into every workbook made from it:
- External links and data connections that fetch data from other files or servers. Excel asks before updating them.
- Hidden content: hidden rows, columns and sheets, comments, names, and the author and company in the document properties.
- Formulas you can't see on protected sheets, if the cells are set to hidden.
Templates in the XLStart folder load every time Excel starts. Only keep files there that you put there yourself, and treat macro-enabled templates (XLTM, XLT) with the same care as any file with code.
Free downloads
Sample XLTX files to download
Free sample Excel templates for testing uploads, file-type detection, spreadsheet libraries and template handling. They were built with openpyxl, then recalculated and saved by LibreOffice 24.2, so every formula is stored with its result. Each opens with openpyxl and in LibreOffice as a new untitled spreadsheet. None contains macros.
Browsers can't show this kind of file in a page. Download it to open it in the app it belongs to.
What's inside sample-invoice.xltx
Browsers can't preview XLTX files, so download it and double-click it: Excel or LibreOffice creates a new, untitled invoice from it. These are the parts to look for.
Input cells
Invoice number, date, payment terms, the customer block and ten invoice lines, filled light blue and unlocked.
Sheet protection without a password
The Invoice sheet is protected so formulas can't be overwritten by accident; Review, Unprotect Sheet turns it off.
Formulas
Net amount and VAT per line, subtotal, VAT total and total due, and a due date of invoice date plus payment terms. They stay blank, or show €0.00, until data goes in.
Number formats
Euro amounts (
"€"#,##0.00), percentages for VAT rates andd mmm yyyyfor dates.Data validation
A date check on the invoice date, numbers of 0 or more for quantities and prices, and VAT rates between 0% and 50%, with input messages.
Defined names and print setup
InvoiceTotalandDueDate, a print area of A1:F30 fitted to one A4 page wide, and a footer with the sample's address and Page X of Y.About sheet and properties
How to use the template, and document properties that say it's a free sample from 99helpers.com/file-types/xltx.
All sample XLTX files
Invoice template
sample-invoice.xltx · 9.6 KB (9,813 bytes)
A one-page invoice template for a fictional studio: input cells, line and total formulas with cached results, currency and date formats, data validation, defined names, sheet protection without a password and print settings.
- Checking that an app creates a new workbook from a template
- Testing formulas, validation and protection in templates
The same invoice as an XLSX
sample-invoice.xlsx · 9.6 KB (9,811 bytes)
Saved by LibreOffice from the same source. Every part is identical except the content type of
xl/workbook.xml.- Comparing a template with a workbook
- Testing code that must tell XLTX from XLSX
Weekly timesheet template
sample-timesheet.xltx · 8.8 KB (9,033 bytes)
Enter a Monday and start, end and break times; dates and hours fill in. Uses
MOD(end-start,1)for shifts past midnight,[h]:mmtotals that go past 24 hours, time validation, a frozen header and a red highlight for days over 10 hours.- Testing time formats and conditional formatting
- Checking how a library reads `[h]:mm` and time values
Minimal XLTX, five parts
sample-minimal.xltx · 1.6 KB (1,669 bytes)
Only the content types, two relationship files, the workbook and one sheet, written by hand: inline strings and one
SUMformula. It's the file shown in the anatomy above.- Parser tests: no styles or shared strings part
- Seeing the template content type on its own
Ways to test with them
- Template or workbook: all four files start with
50 4B 03 04. Read the content type of/xl/workbook.xmlin[Content_Types].xml: three saytemplate,sample-invoice.xlsxsayssheet. - New workbook, not the file: opening
sample-invoice.xltxshould create an untitled workbook. An app that saves over the template has a bug. - Libraries: load
sample-invoice.xltxwith openpyxl and save it as.xlsx: withoutwb.template = False, the result still has the template content type. - Cached results: a reader should see
0as the stored result ofE27(total due) and=E25+E26as its formula, without recalculating. - Uploads and MIME types: check your server sends
application/vnd.openxmlformats-officedocument.spreadsheetml.templatefor.xltx, not the XLSX type orapplication/zip.
Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.
Put it online
Have an XLTX file? Give it a link.
Drop an Excel template on 99helpers and it gets its own link, ready to share with your team. Browsers can't display XLTX files, so visitors download it and open it in Excel or LibreOffice, which start a new workbook from it.
Questions
XLTX files, frequently asked
What is an XLTX file?
A Microsoft Excel template in the Office Open XML format, used since Excel 2007. Opening it creates a new, unsaved workbook with the template's sheets, formulas and formatting.
What's the difference between XLTX and XLSX?
Inside, only the content type of xl/workbook.xml: …template.main+xml instead of …sheet.main+xml. In use, an XLSX opens itself, while an XLTX creates a new workbook and stays unchanged.
How do I edit an Excel template?
Open Excel and use File, Open to open the .xltx itself. Double-clicking it only creates a new workbook. Make your changes and save.
Where does Excel keep templates?
Personal templates go to the folder set under File, Options, Save (usually Documents\Custom Office Templates). Book.xltx and Sheet.xltx for new blank workbooks and sheets go in the XLStart folder.
How do I change Excel's default workbook?
Set up a workbook, save it as an Excel Template named Book, and put it in the XLStart folder. New blank workbooks then start from it.
How do I convert XLTX to XLSX?
Open the template, which creates a new workbook, and save that as Excel Workbook (.xlsx). With LibreOffice: soffice --headless --convert-to xlsx file.xltx.
What's the difference between XLTX and XLTM?
An XLTM may contain VBA macros, and workbooks made from it get a copy of them. An XLTX can't contain macros.
Can Google Sheets open an XLTX file?
Yes. It converts it into an ordinary Google Sheet. Work and school accounts may be able to add it to their organisation's template gallery.
Related formats
Other file types explained
Keep going
Related
Sources
- IANA: application/vnd.openxmlformats-officedocument.spreadsheetml.template
- ECMA-376: Office Open XML file formats
- Microsoft Support: Save a workbook as a template
- Microsoft Support: Customize how Excel starts (Book and Sheet templates, XLStart)
- Google Workspace Updates: conversion support for xlt, xltx and other formats (2014)
- Google Workspace Learning Center: Create and use templates
Last reviewed 27 October 2026.