Add the Microsoft Excel Object Library in Visual Studio 2019
Question details
The user needs to add an Excel automation reference to a Visual Basic application 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.
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.
Add the Excel Object Library as a COM reference
Use Reference Manager when the installed Excel object library is registered and available.
In Visual Studio 2019, open the Visual Basic project, then choose Project > Add Reference.
Select COM > Type Libraries and look for Microsoft Excel Object Library. The entry may include a version number, such as 16.0.
Check the Excel library and select OK. In a code file, use Imports Excel = Microsoft.Office.Interop.Excel to refer to the interop namespace.

Repair Microsoft 365 and check the reference again
Try an Office repair if desktop Excel is installed but its object library is not listed.
Add the Excel interop assembly through NuGet
Use the NuGet package as an alternative way to reference the Excel interop assembly.
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.

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.




