How to reference Microsoft.Office.Interop.Excel dll?

前端 未结 6 1018
小鲜肉
小鲜肉 2020-11-27 15:56

I had developed a system that deals with excel sheets in 2006 using MS VS 2005. Now, I can not use the same reference with MS VS 2012.

var app = new Microso         


        
6条回答
  •  悲哀的现实
    2020-11-27 16:15

    You can also try installing it in Visual Studio via Package Manager.

    Run Install-Package Microsoft.Office.Interop.Excel in the Package Console. This will automatically add it as a project reference.

    Use is like this:

    Using Excel=Microsoft.Office.Interop.Excel;
    

提交回复
热议问题