To add a library in Excel, first decide whether you mean an Office add-in, an Excel add-in file, or a VBA code library: use Insert > Get Add-ins for an Office add-in, File > Options > Add-ins > Manage: Excel Add-ins > Go for an .xlam or .xll file, or open the VBA editor and choose Tools > References to connect a VBA project to a library. Excel has no single command called Add Library, so the right steps depend on what you want the library to do.
What “library” means in Excel
People use “library” to describe several different things in Excel. The most common is an add-in: an optional feature or tool that adds commands, functions, or integrations to Excel. Another meaning is a programming library that VBA code uses, such as the Microsoft Scripting Runtime. A third possibility is a package used with Python in Excel. These are separate systems and are installed or enabled in different ways.
Before changing settings, identify what you have. A file ending in .xlam or .xll is usually an Excel add-in; a web-based tool listed in Get Add-ins is an Office add-in; and instructions mentioning VBA, an object library, or Tools > References refer to a code dependency. If someone says to “install a library” but gives no file, package name, or instructions, ask which of these they mean. Installing the wrong type will not make the feature you need appear.
Add an Office add-in from the catalog
Office add-ins are typically installed from Excel’s add-ins catalog. In Excel for Microsoft 365 on Windows, open the workbook and choose Insert > Get Add-ins. Browse or search for the add-in, open its listing, and choose Add or Get it. After installation, the add-in may appear on the ribbon or be available from Insert > My Add-ins, depending on how its publisher designed it. You may be asked to sign in or grant permissions.
Use the catalog when you want a supported integration or tool and do not have a separate add-in file. For example, a team might use a catalog add-in to connect Excel to an external service. Read the listing and permission details before adding it: an add-in may be able to access workbook data or communicate with its provider. If Get Add-ins is missing, your organization may have disabled access, or your Office installation may need an update or sign-in. An administrator can control which add-ins are available.
To remove or manage an Office add-in, use Insert > My Add-ins and look for its menu or management options. The exact controls can vary by add-in and account. Removing an Office add-in is different from unchecking an Excel add-in file in the Options dialog; they are managed separately.
Load an Excel add-in file
If you have an .xlam, .xla, or .xll file from a trusted source, load it through Excel’s add-in manager. On Windows, choose File > Options > Add-ins. At the bottom of the window, select Excel Add-ins in the Manage list and click Go. Select the add-in if it is listed, then click OK. If it is not listed, click Browse, locate the file, select it, and confirm. Excel may ask whether to copy the add-in to a convenient folder; follow the prompt if offered.
Excel add-ins can provide custom functions, ribbon commands, or other features. Microsoft’s Analysis ToolPak and Solver are examples of optional Excel add-ins that can be enabled from the same manager when available. After enabling one, look for its commands on the Data tab or another relevant ribbon tab; the location depends on the add-in. If the add-in supplies functions, check its documentation for the exact function names and any setup requirements.
Excel needs to be able to find the file when it starts. Avoid moving or renaming an add-in after loading it, because Excel may then fail to load it. To turn it off, return to File > Options > Add-ins, choose Excel Add-ins in Manage, click Go, and clear its checkbox. This normally disables it without deleting the file. If you want to remove it entirely, first disable it and then delete the file only if you know it is not used by another workbook or process.
Connect a library to a VBA project
A VBA reference tells a macro project which object library it can use; it does not install that library on your computer. In Excel for Microsoft 365 on Windows, press Alt+F11 to open the Visual Basic Editor, select the project in the Project Explorer, and choose Tools > References. Tick the required library in the list and click OK. If you do not see the Project Explorer, open it from the View menu in the editor.
For example, a VBA project that uses objects from the Microsoft Scripting Runtime may need that reference selected. The project’s code and the library must both be available for the reference to work. References can be specific to a computer or Office installation, so a workbook that runs on one person’s computer may not run on another’s without the same dependency. For code shared across a team, document required references and test on the versions and platforms coworkers use.
If the References window shows a checked item beginning with MISSING, Excel cannot find that library at the location recorded by the project. Uncheck the missing item and select an appropriate installed replacement only if the project’s code supports it; simply checking a similarly named library may not fix incompatible code. If you are not the workbook’s author, ask for the required library name and a compatible copy of the project. VBA references are not the same as Excel’s add-in manager, and loading an .xlam does not automatically fix every missing VBA reference.
What changes on Mac and Excel for the web?
In Excel for Mac, Office add-ins are generally accessed through Insert > Get Add-ins, though availability and labels can vary with the installed build and account. Traditional Excel add-in files are managed from Tools > Excel Add-ins rather than Windows’ File > Options > Add-ins route. VBA is available in desktop Excel for Mac, but some Windows-specific libraries, controls, and APIs are not supported there. A reference that works on Windows therefore may not work on a Mac.
Excel for the web supports Office add-ins where available, but it does not provide the desktop VBA editor or load traditional VBA add-in files in the same way as desktop Excel. If a workbook relies on macros or a Windows-only add-in, open it in the appropriate desktop version. A workbook can still store VBA code while open in a browser, but browser Excel cannot run that VBA code.
Keyboard shortcuts can also differ by device. Alt+F11 is the usual Windows shortcut for the VBA editor; on Mac, use the Developer tab’s Visual Basic command or the shortcut assigned by your keyboard and Excel setup. The ribbon route is preferable if function keys are configured differently.
Python packages are a different kind of library
Python in Excel is not the same as an Excel add-in or a VBA reference. Where Python in Excel is available for a Microsoft 365 account and platform, it runs Python in a managed environment with a curated set of packages. You use Python features in the worksheet rather than installing a conventional Excel add-in file. Availability depends on the subscription, platform, update channel, and organization settings.
That managed setup is not a general local Python installation: users cannot assume they can add any package with a command such as pip install. Check Microsoft’s current Python in Excel package and availability documentation for the supported packages and account requirements. If a package is not supported, alternatives include using Python outside Excel to prepare data, using Power Query for supported import and transformation tasks, or asking an administrator whether an approved integration is available.
Choose carefully and keep add-ins safe
Use the method that matches the task rather than installing several things in the hope that one works. An Office add-in is a good fit for a catalog-listed service; an .xlam or .xll is appropriate when a trusted provider specifically supplies an Excel add-in file; and a VBA reference is for a macro project that requires a particular object library. Python packages belong to Python in Excel or an external Python environment, not the Excel add-in manager.
- Confirm the publisher, file type, version requirements, and installation instructions before opening a downloaded add-in.
- Use a work-approved source for business files, and ask IT before changing trusted locations, security settings, or organizational add-in policies.
- Keep the original download or a backup of important workbooks, especially when a macro-enabled file is involved.
- Review permissions for web add-ins and remove tools you no longer use.
Do not disable macro security just to make an unfamiliar add-in run. A downloaded file can contain harmful code, and a security warning is a reason to verify its source, not to click through automatically. If the tool is legitimate but blocked by policy, contact the publisher or your administrator for an approved distribution method.
Common installation problems
If an add-in does not appear after installation, first check that you installed the correct type. For an .xlam file, confirm it is checked under Excel Add-ins in the Manage list; for an Office add-in, look in My Add-ins. Close and reopen Excel if the provider’s instructions require it. Also confirm that the add-in matches your Excel platform and version, and that its file has not been moved.
If Excel blocks a file, review the security message and confirm that the download came from a trusted publisher. Do not change global security settings to bypass a warning. If a VBA project reports a missing reference, inspect Tools > References in the VBA editor and compare the required library with what is installed. If the option you need is absent, check whether you are using desktop Excel, whether your account or organization permits the feature, and whether the feature is supported on your operating system.
For a repeatable team setup, record the add-in name, version, source, required Excel platform, and any VBA references in the workbook’s documentation. This makes it easier to diagnose why a colleague sees a different ribbon or receives a missing-library error.
Frequently Asked Questions
How do I add the Analysis ToolPak in Excel?
On Windows, go to File > Options > Add-ins, choose Excel Add-ins in the Manage list, and click Go. Select Analysis ToolPak and click OK. If it is not listed, check your Office installation or organization’s software settings.
Where do I find Excel add-ins after installing them?
It depends on the add-in type. Office add-ins are generally managed through Insert > My Add-ins. Traditional .xlam or .xll files are managed through File > Options > Add-ins on Windows, or Tools > Excel Add-ins on Mac.
Can I install an Excel library in Excel for the web?
You can use supported Office add-ins in Excel for the web, but it does not load traditional VBA add-in files or run VBA macros. Open the workbook in desktop Excel if its features depend on those files or macros.
Why does VBA say a reference is missing?
The project expects a library Excel cannot find on your computer, or it is unavailable on your version of the operating system or Office. In the VBA editor, open Tools > References and inspect the item marked MISSING; confirm the required library and compatibility before replacing it.
Can I install any Python package in Python in Excel?
No. Python in Excel uses a managed environment with supported packages rather than a normal local installation where you can freely run pip install. Check the current Microsoft documentation for package support and availability for your account.
Related
- How to Add the Copilot Icon in Excel
- Convert XLS to Excel: How to Save as an XLSX Workbook
- Convert XML to Excel: Import, Clean, and Save Data
Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.
More in VBA & macros
- Excel VBA Open File Dialog: Code and OptionsIn Excel VBA for Windows, use Application.FileDialog(msoFileDialogFilePicker) to display a file picker, let the user choose a file,…
- Excel VBA Get Array Dimensions: Bounds, Rank, and SizeIn Excel VBA, use LBound(array, dimension) and UBound(array, dimension) to get an array’s lower and upper bounds; its…
- Outlook IF Statement Examples for VBA and Mail MergeOutlook does not have one universal IF formula: use Outlook rules for basic message conditions, VBA If...Then statements…
- Excel VBA Active Worksheet: How It Works and When to Use ItIn Excel VBA, ActiveSheet refers to the sheet currently selected in the active workbook. It is not a…
- Excel VBA Data Entry Form With a Picture Box: How It WorksYes. In Excel for Microsoft 365 on Windows, make a VBA UserForm, add an Image control to act…
- Excel VBA Get a Character from a String by PositionTo get one character from a string in Excel VBA, use Mid$(text, position, 1); the position starts at…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.