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

前端 未结 6 1016
小鲜肉
小鲜肉 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:10

    You have to check which version of Excel you are targeting?

    If you are targeting Excel 2010 use version 14 (as per Grant's screenshot answer), Excel 2007 use version 12 . You can not support Excel 2003 using vS2012 as they do not have the correct Interop dll installed.

提交回复
热议问题