XLB File Documentation


Summary

An XLB (Excel Toolbars File) is an internal Microsoft Excel settings file that stores your customised toolbars and menus: which buttons appear, where they sit, and what each one does. Excel creates and updates it automatically, usually as Excel.xlb in your user profile, so it is not a document you open or share. If toolbars get corrupted, deleting the .xlb makes Excel rebuild a fresh default (you lose customisations). It belongs to classic, pre-ribbon Excel.

Technical details

FeatureValue
Full nameMicrosoft Excel Toolbar Settings File
File extension.xlb
MIME typeapplication/octet-stream
Format typeProprietary binary Excel configuration file
DeveloperMicrosoft
EraClassic pre-ribbon Excel (through Excel 2003); vestigial after
StoresCommand-bar/toolbar layout, button order, command assignments, custom icons
Contains cell data?No — it is settings, not a workbook
Typical namesExcel.xlb, Excel10.xlb, Excel11.xlb, <user>.xlb
Typical location%AppData%\Microsoft\Excel
Auto-generated?Yes — Excel writes it on exit, recreates if missing
Magic numberNone documented (not the OLE2 D0 CF 11 E0 workbook format)
Modern equivalentRibbon/QAT settings live in Excel.officeUI (XML)
Safe to delete?Yes — Excel rebuilds a default (customisations lost)
Related extensions.xls, .xlsx, .xlam, .xla
Open standardNo (undocumented internal format)

What is an XLB file?

An XLB file is the file Microsoft Excel uses to remember your toolbar and menu customisations. In classic Excel, when you add, move or remove a toolbar button, or rearrange a menu, those changes are written to an XLB file in your user profile. Excel saves it automatically when you quit and reloads it on the next launch, so your custom layout persists between sessions. It is a private binary configuration file, not a spreadsheet: it holds no cells or formulas, only the button and menu layout, the command each button runs, and any custom icon images.

The XLB belongs to the pre-ribbon era of Excel, the command-bar model that ran through Excel 2003. Because Excel generates and owns the file, there is no real reason to open, edit or convert it, and no user-facing viewer for its contents. The two situations people actually hit are toolbars becoming corrupted, and wanting to move a custom layout to another PC. Both are covered below.

Where the file lives and how it is named

The XLB is stored per user, under the Excel application-data folder, and its name encodes the Excel version or the login.

%AppData%\Microsoft\Excel\
  Excel.xlb        current
  Excel11.xlb      Excel 2003
  Excel10.xlb      Excel 2002 / XP
  <username>.xlb   older versions
full path example:
  C:\Users\<you>\AppData\Roaming\Microsoft\Excel\Excel.xlb

Because the name is version-specific, upgrading Excel typically leaves the old Excel1x.xlb behind and starts a new one. The file has no documented magic number and is not the OLE2 compound-file format that a real .xls workbook uses (D0 CF 11 E0): it is a separate private settings blob Excel writes for itself. You identify it by name and location, not by inspecting its bytes, which is why there is no useful “open with” program for it.

What the file records

Inside, the XLB describes the state of Excel’s command bars: which toolbars exist and whether each is shown or hidden and where it is docked, the buttons on each toolbar and their order, what each button does (a built-in command or a macro you assigned), and any custom button-face images. It is purely interface state. That is also why deleting it is a clean reset: nothing in your workbooks depends on it, so removing it only reverts the toolbars to their defaults.

Resetting corrupted toolbars and copying a layout

The most common reason to touch an XLB is to fix toolbars that have become corrupted or “stuck”. The standard repair is to close Excel completely, then rename or delete the .xlb; Excel rebuilds a clean default file on the next launch. The trade-off is that you lose your toolbar and menu customisations, so it is worth backing up the file first if those matter. The reverse task, copying a customised layout to another computer, is done by copying the .xlb into the same profile folder on the other machine. This is fragile across differing Excel versions, since the layout can reference commands or version specifics that do not line up, so it works best between matching Excel builds.

Why modern Excel barely uses it

Excel 2007 replaced the old command-bar toolbars with the ribbon, and interface customisations moved to a different file. Ribbon and Quick Access Toolbar settings are now stored as Excel.officeUI, an XML file, rather than in the binary XLB. Modern Excel may still maintain an XLB for backward-compatible command-bar state, but for most users it is a vestigial, auto-managed file they never need to think about. If you are customising the interface in a current version of Excel and looking for where those settings are saved, the answer is Excel.officeUI, not the XLB.

Frequently asked questions

Can I delete the Excel.xlb file?

Yes. If toolbars are corrupted, close Excel and delete or rename the .xlb; Excel rebuilds a fresh default on the next launch. The only cost is losing your toolbar customisations, so back it up first if you want to keep them. No workbook data is affected, because the file holds interface settings only.

How do I open an XLB file?

You do not open it directly. Excel reads it automatically at startup and there is no viewer for its contents; it just stores toolbar settings. The files you actually open in Excel are workbooks such as .xls and .xlsx. If you found Excel.xlb in your AppData folder, it is simply Excel’s saved toolbar layout.

References