VBA & Macro Problems

Add the Microsoft Excel Object Library in Visual Studio 2019

Ayan MasoodAyan Masood Nov 18, 2026 869 views

Question details

The user needs to add an Excel automation reference to a Visual Basic application in Visual Studio 2019.

Add the Microsoft Excel Object Library in Visual Studio 2019
Product
Microsoft Excel for Microsoft 365 and Visual Studio 2019
Device & OS
not provided
Scenario
A developer is setting up Excel interop in a Visual Basic project.
Observed behavior
The Microsoft Excel Object Library is missing from Visual Studio Reference Manager.
Before you start

Confirm that the Excel desktop application is installed and opens successfully on the development computer. In Visual Studio, check that the Visual Basic project targets a Windows-compatible framework and platform for Excel COM automation.

Solution 1Recommended

Add the Excel Object Library as a COM reference

Use Reference Manager when the installed Excel object library is registered and available.

1
Open Reference Manager

In Visual Studio 2019, open the Visual Basic project, then choose Project > Add Reference.

2
Find the Excel library

Select COM > Type Libraries and look for Microsoft Excel Object Library. The entry may include a version number, such as 16.0.

3
Add the reference

Check the Excel library and select OK. In a code file, use Imports Excel = Microsoft.Office.Interop.Excel to refer to the interop namespace.

Add the Excel Object Library as a COM reference
Library not listed?: If the Excel entry is absent, repair the Office installation or use the NuGet interop assembly approach below.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight alternative for opening and editing spreadsheets in a familiar interface. It supports common Microsoft Office formats to help you move everyday documents between suites, but it does not fix Visual Studio references or replace Excel COM automation.

Open and edit spreadsheets in WPS SpreadsheetsCompatible with Microsoft Excel formats, including XLSX and XLSFamiliar spreadsheet interface for everyday workbook tasksFree and lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Where is the Excel Object Library in Visual Studio 2019?

Open your project and choose Project > Add Reference > COM > Type Libraries. Look for Microsoft Excel Object Library, which may have a version number in its name.

Why is the Excel Object Library missing from Reference Manager?

Excel desktop may not be installed, or its COM registration may need repair. Confirm that Excel opens, then try Microsoft 365 repair from Windows Settings > Apps > Microsoft 365 > Modify.

Can I use the Excel interop NuGet package without installing Excel?

No. The Microsoft.Office.Interop.Excel package supplies an interop assembly, but Excel desktop must be installed and available for Excel COM automation.

Does WPS Office fix a missing Excel COM reference?

No. WPS Office can open and edit Excel-format workbooks, but it does not repair Microsoft Excel registration or replace the Excel Object Library in a Visual Studio automation project.