File types · Explainer

The XLT file (.xlt)

An XLT file is a Microsoft Excel template in the binary format of Excel 97 to 2003: opening it creates a new workbook based on it. This guide explains what's inside one, the four bytes that can mark it as a template, how it differs from XLTX and XLS, the risks worth knowing, and has free sample XLT files to download for testing.

At a glance

Full name
Excel 97-2003 Template (Binary Interchange File Format 8, BIFF8)
Extensions
.xlt
MIME type
application/vnd.ms-excel, the same as XLS
Kind
Binary: BIFF8 records in a Workbook stream inside an OLE2 compound file
Owner
Microsoft; documented in the [MS-XLS] open specification
First released
1997, with Excel 97; Excel's template format until Excel 2007 introduced XLTX
Opens with
Microsoft Excel, LibreOffice Calc; Google Sheets converts it to an ordinary spreadsheet
Magic number
D0 CF 11 E0 A1 B1 1A E1 (any OLE2 file); the Workbook stream starts with a BOF record
What marks it
A 4-byte record 60 00 00 00 right after the first BOF record, which PRONOM uses to identify templates; not every XLT has it
Sheet size
65,536 rows by 256 columns, as in XLS
Macros
Allowed: VBA and Excel 4.0 (XLM) macro sheets, under the same extension

The basics

What is an XLT file?

An XLT file is an Excel template from the Excel 97 to 2003 era. Like any template, it's a workbook set up to be copied: invoices, timesheets, budgets and report layouts were shared as .xlt files, and opening one gave you a new workbook with the template's sheets, formulas, formatting and print settings, leaving the template unchanged. Excel 2007 replaced it with XLTX and XLTM, but current Excel still opens and saves XLT, as Excel 97-2003 Template.

Inside, an XLT is an XLS workbook in the BIFF8 format, with the same limits: 65,536 rows and 256 columns per sheet and a 56-colour palette.

  • It's binary. The cells, formulas and formats are records in a stream, not readable XML.
  • It can contain macros under the same extension: VBA and old Excel 4.0 macro sheets.
  • The MIME type is the same as XLS: application/vnd.ms-excel. Only the extension and, sometimes, one record say it's a template.

Anatomy

What's inside an XLT file

An XLT is built like an XLS: an OLE2 compound file with the workbook in a Workbook stream, as a list of records with a 2-byte type, a 2-byte length and data. This is our sample-invoice.xlt, which carries the template record, compared with sample-invoice.xls.

sample-invoice.xlt (hex and records)
$ xxd -l 80 sample-invoice.xlt      (first 80 of the 512 header bytes)
00000000: d0cf 11e0 a1b1 1ae1 0000 0000 0000 0000  ................
00000010: 0000 0000 0000 0000 3e00 0300 feff 0900  ........>.......
00000020: 0600 0000 0000 0000 0000 0000 0100 0000  ................
00000030: 1200 0000 0000 0000 0010 0000 1100 0000  ................
00000040: 0100 0000 feff ffff 0000 0000 1400 0000  ................

Root class 00020810-0000-0000-C000-000000000046
Streams: Workbook 7,231 bytes, \x05SummaryInformation 464,
\x05DocumentSummaryInformation 168, \x01CompObj 73, \x01Ole 20

Workbook stream, record by record (offset, type, name, length, data):
0000  0809  BOF           16  00 06 05 00 bb 0d cc 07 …
0014  0060  TEMPLATE       0
0018  00e1  INTERFACEHDR   2  b0 04
001e  00c1  MMS            2  00 00
0024  00e2  INTERFACEEND   0
0028  005c  WRITEACCESS  112  04 00 00 43 61 6c 63 20 …   "Calc"
…
07b8  0085  BOUNDSHEET    15  14 0d 00 00 00 00 07 00 "Invoice"
07cb  0085  BOUNDSHEET    13  d1 19 00 00 00 00 05 00 "About"
0838  0018  NAME          34  … "InvoiceTotal"
…
0d14  0809  BOF           16  00 06 10 00 …   (the Invoice sheet)

sample-invoice.xls, the same workbook, starts:
0000  0809  BOF           16  00 06 05 00 bb 0d cc 07 …
0014  00e1  INTERFACEHDR   2  b0 04
  1. 1d0cf 11e0 a1b1 1ae1

    The OLE2 signature

    The same 8 bytes start XLS, DOC, DOT and PPT files, so they only say "compound file".

  2. 23e00 0300 feff 0900 0600

    Version and sector sizes

    Minor version 0x003E, major version 3, little-endian, 512-byte sectors, 64-byte mini sectors. The XLS page explains the header; LibreOffice writes 0x003B as the minor version, and readers don't depend on it.

  3. 3Root class 00020810-…

    The class ID

    {00020810-0000-0000-C000-000000000046}, the class of an Excel 97-2003 workbook. Templates carry the same one, and the CompObj stream says Biff8 either way.

  4. 40809 BOF · 00 06 05 00

    Beginning of file

    0x0600 means BIFF8 and 0x0005 the workbook globals: settings, fonts, formats, names and the list of sheets.

  5. 50060 TEMPLATE 0

    The template record

    Type 0x0060, length 0: four bytes, 60 00 00 00, with no data. Its presence says the workbook is a template. In the XLS the next record, INTERFACEHDR, follows the BOF directly.

  6. 600e1 INTERFACEHDR · b0 04

    The code page

    0x04B0 is 1200, UTF-16. PRONOM's signature for Excel 97-2003 templates is exactly these bytes after the BOF: 60 00 00 00 E1 00 02 00 B0 04.

  7. 7005c WRITEACCESS … "Calc"

    Who saved it

    The user name of the last person to save the file, padded with spaces. LibreOffice writes Calc; Excel writes the user's name, which is worth knowing before you share a template.

  8. 80085 BOUNDSHEET · 14 0d 00 00

    Sheet entries

    Each sheet's name, and where its records start in the stream: 0x0D14 for Invoice. Adding the 4-byte template record moves everything after it, so these offsets had to move by 4 too.

  9. 90018 NAME … "InvoiceTotal"

    A defined name

    InvoiceTotal refers to Invoice!$E$27. Names, formats, validation and protection are copied into every workbook made from the template.

Under the hood

What makes an XLT different from an XLS

PRONOM, the UK National Archives' format registry, identifies an Excel 97-2003 template by a record of type 0x0060 with no data placed right after the first BOF record of the Workbook stream. That record is the only structural mark of a template. Whether a file has it depends on the program that saved it:

SampleTemplate recordHow it was made
sample-invoice.xltYes, at offset 0x14Saved by LibreOffice, then the 4-byte record inserted and the stream offsets after it moved by 4
sample-timesheet.xltNoExactly as LibreOffice 24.2 saved it with its Excel 97–2003 Template filter
sample-invoice.xlsNoSaved by LibreOffice as an ordinary Excel 97-2003 workbook

LibreOffice doesn't write the record: with the save time fixed, its .xlt and .xls output for the same workbook were byte-for-byte identical. So, in practice:

  • Many XLT files are only XLT by name. A signature-based tool following PRONOM sees sample-timesheet.xlt as an ordinary XLS workbook.
  • Apps go by the extension. In our tests, LibreOffice opened sample-invoice.xlt renamed to .xls as an ordinary workbook, record or not, and every .xlt as a new untitled one.
  • Libraries ignore it. xlrd reads all three samples the same way; the record is just skipped.

In Excel

Using XLT templates in current Excel and LibreOffice

  • Create a workbook from it: double-click the .xlt, or put it in your personal templates folder and choose it from File, New, Personal. Excel creates a new workbook named after the template, such as invoice1, in Compatibility Mode because the template is in the old format.
  • Edit the template itself: in Excel, File, Open the .xlt. Save it back as XLT only if someone still uses Excel 2003 or older.
  • Where templates go: your personal templates folder, set under File, Options, Save, usually Documents\Custom Office Templates on Windows.
  • Default workbook: Excel starts new blank workbooks from a template named Book in the XLStart folder. Current Excel uses Book.xltx; older versions used Book.xlt.
  • LibreOffice Calc opens an XLT as a new untitled spreadsheet and can save one: File, Save As, Excel 97–2003 Template.

A workbook made from an XLT is limited like any XLS while it stays in Compatibility Mode: 65,536 rows, 256 columns, 4,000 cell formats. Save the new workbook as XLSX to lift the limits, or convert the template to XLTX once.

Comparison

XLT vs XLTX, XLTM, XLS and XLSX

XLTXLTXXLTMXLSXLSX
What it isExcel 97-2003 templateExcel templateExcel template with macrosExcel 97-2003 workbookExcel workbook
StructureBIFF8 in OLE2ZIP of XMLZIP of XMLBIFF8 in OLE2ZIP of XML
What marks a templateExtension; sometimes a 0x0060 recordWorkbook content typeWorkbook content type(not a template)(not a template)
Rows per sheet65,5361,048,5761,048,57665,5361,048,576
MacrosYes, same extensionNoYesYes, same extensionNo

Convert XLT templates to XLTX when you next change them, or to XLTM if they need their macros: new workbooks then start in the current format, and an XLTX can't carry code.

How to

How to open and convert an XLT file

  • Convert to XLTX in Excel: File, Open the .xlt, then File, Save As, **Excel Template (*.xltx), or Excel Macro-Enabled Template (*.xltm)** to keep macros.
  • Convert with LibreOffice: soffice --headless --convert-to 'xltx:Calc MS Excel 2007 XML Template' old.xlt, or --convert-to xlsx for a workbook. To write an XLT: soffice --headless --convert-to 'xlt:MS Excel 97 Vorlage/Template' invoice.xlsx.
  • Google Sheets converts an uploaded XLT into an ordinary Google Sheet; macros are removed.
  • In code: xlrd reads XLT files like XLS. To check for the template record, open the Workbook stream with olefile and compare bytes 20 to 23 with 60 00 00 00.
  • In a browser: browsers can't display XLT files, so a link to one downloads it.

Troubleshooting

Common XLT problems and how to fix them

  • Opening the template gives invoice1, not the template. That's how templates work. Use File, Open in Excel to edit the template itself.
  • Someone saved data into the template. They opened it with File, Open and saved. Keep a read-only master copy, and look for the number Excel adds to the name of a new workbook.
  • New workbooks are in Compatibility Mode. They inherit the old format from the XLT. Convert the template to XLTX.
  • Data is cut off at row 65,536. The workbook is still in the XLS format. Save it as XLSX.
  • Excel blocks the file. Trust Center, File Block Settings can block Excel 97-2003 workbooks and templates, often by company policy.
  • An upload filter treats it as XLS. Same MIME type, often the same bytes: decide by extension, or look for the template record, knowing many XLT files don't have one.

Security

Is an XLT file safe to open?

An XLT deserves the same care as an XLS: the extension doesn't tell you whether it contains macros.

  • VBA and Excel 4.0 macros can sit in a template, and workbooks made from it get a copy, as they do from an XLTM. Office on Windows blocks macros in files from the internet by default since 2022.
  • Templates in XLStart load every time Excel starts, so a macro template placed there runs its code in every session. Check the folder if Excel behaves oddly.
  • WRITEACCESS and the document properties keep the name of whoever last saved the template.
  • Weak passwords. Like XLS, a password-protected XLT uses XOR obfuscation or RC4, often with a 40-bit key.

Don't enable content in a template you didn't expect. If an XLT only needs formulas and formatting, convert it to XLTX, which can't carry code. Our samples contain no macros.

Free downloads

Sample XLT files to download

Free sample Excel 97-2003 templates for testing file-type detection, spreadsheet libraries and template handling. They were built with openpyxl and saved by LibreOffice 24.2 after recalculating, so every formula carries its result; all three read with xlrd and convert with LibreOffice. None contains macros.

sample-invoice.xlt · 11 KBDownload

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.xlt

Browsers can't preview XLT files, so download it and double-click it: Excel or LibreOffice creates a new, untitled invoice from it. It holds the same invoice as our sample XLTX, so you can compare the formats.

  1. The template record

    Bytes 20 to 23 of the Workbook stream are 60 00 00 00, the record PRONOM uses to recognise Excel 97-2003 templates.

  2. Input cells and protection

    Invoice number, date, terms, customer and ten lines, filled light blue and unlocked; the sheet is protected without a password.

  3. Formulas with cached results

    Net amount, VAT, subtotal and total due, and a due date of invoice date plus payment terms, stored as compiled tokens with their results.

  4. Formats and validation

    Euro amounts, percentages and dates, plus validation rules for the date, quantities, prices and VAT rates.

  5. Defined names and print setup

    InvoiceTotal and DueDate as NAME records, a print area of A1:F30 fitted to one page wide, and a footer with page numbers.

  6. Document properties

    Title "Invoice template" and the comment that it's a free sample from 99helpers.com/file-types/xlt, in the summary streams.

All sample XLT files

  • Invoice template, with the template record

    sample-invoice.xlt · 11 KB (11,264 bytes)

    A one-page invoice template for a fictional studio: input cells, formulas, currency and date formats, validation, defined names, sheet protection and print settings. Carries the 0x0060 template record after the BOF.

    • Testing template detection by signature
    • Checking that an app creates a new workbook from an XLT
  • The same invoice as an XLS

    sample-invoice.xls · 11.5 KB (11,776 bytes)

    The same workbook saved as an ordinary Excel 97-2003 workbook. Its Workbook stream is 4 bytes shorter: no template record, and the stream offsets that follow are 4 lower.

    • Comparing a template with a workbook
    • Testing code that must tell XLT from XLS
  • Timesheet template, as LibreOffice writes it

    sample-timesheet.xlt · 10 KB (10,240 bytes)

    A weekly timesheet with MOD(end-start,1) hours, [h]:mm totals, time validation and conditional formatting. Saved by LibreOffice's Excel 97–2003 Template filter, so it has no template record: only its name says it's a template.

    • Testing detection by extension
    • Checking how a reader handles time values

Ways to test with them

  • Template detection: read bytes 20 to 23 of each Workbook stream. Only sample-invoice.xlt has 60 00 00 00; a detector that relies on it calls the timesheet an XLS.
  • Same MIME type: all three are application/vnd.ms-excel. An upload rule that treats XLT differently from XLS has to look at the extension.
  • New workbook, not the file: opening either XLT should create an untitled workbook; an app that saves over the template has a bug.
  • Libraries: xlrd should read the same cells from sample-invoice.xlt and sample-invoice.xls, including 0 as the total due in E27.
  • Conversion: convert sample-invoice.xlt to XLTX and check the validation rules, the protection and the defined names survive.

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 XLT file? Give it a link.

Drop an Excel 97-2003 template on 99helpers and it gets its own link. Browsers can't display XLT files, so visitors download it and open it in Excel or LibreOffice, which start a new workbook from it.

Questions

XLT files, frequently asked

What is an XLT file?

A Microsoft Excel template in the binary format of Excel 97 to 2003. Opening it creates a new workbook with the template's sheets, formulas and formatting.

What's the difference between XLT and XLS?

Both use the BIFF8 format. An XLT is opened as a template, creating a new workbook, and may carry a 4-byte template record after its first BOF record. Some programs, LibreOffice among them, write identical bytes for both.

What's the difference between XLT and XLTX?

XLT is the binary template format of Excel 97 to 2003, limited to 65,536 rows and able to hold macros. XLTX is the XML-based template format of Excel 2007 and later and can't hold macros.

How do I open an XLT file?

Double-click it to create a new workbook from it in Excel or LibreOffice Calc. To edit the template itself, open it with File, Open in Excel.

How do I convert XLT to XLTX?

Open it in Excel with File, Open, then File, Save As, Excel Template (*.xltx). With LibreOffice: soffice --headless --convert-to 'xltx:Calc MS Excel 2007 XML Template' file.xlt.

Can an XLT file contain macros?

Yes. XLT files can hold VBA and Excel 4.0 macros, and workbooks made from them get a copy. Don't enable content in templates you didn't expect.

What MIME type does an XLT file have?

application/vnd.ms-excel, the same as an XLS file.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.