Click here to Skip to main content
15,942,545 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have Microsoft Office installed in my computer, and I'm about to begin Excel programming with Visual Studio 2019. I added Microsoft Office 16.0 Object Library reference to my project, but the added reference doesn't show in the project's reference list. When I add 'using ExelNS=Microsoft.Office.Interop.Excel' I get following error message:
C50234: The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office (are you missing an assemble reference?)'.

What I have tried:

What can I do? Am I missing something? 
Updated 30-Aug-22 21:57pm

1 solution

You need to add the Interop assemblies as well: Microsoft.Office.Interop.Excel
Share this answer
CPallini 31-Aug-22 4:03am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900