The easiest and most reliable method for modern Visual Studio projects is using . This ensures that all dependencies are correctly managed within your project.
dotnet add package Microsoft.Office.Interop.Excel microsoft.office.interop.excel download