Microsoft.Office.Interop.Excel.ApplicationClass has no constructor defined

前端 未结 3 610
刺人心
刺人心 2021-01-07 18:27

I tried to follow How to open an Excel file in C# tutorial, i.e. added a reference on the Com tab to Microsoft Office 14.0 Object Library and trie

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-07 18:52

    Use the following to open it:

    xlApp = CreateObject("Excel.Application");
    

    CreateObject creates and returns a reference to a COM object. Documentation may be found here:

    http://msdn.microsoft.com/en-us/library/7t9k08y5%28v=vs.71%29.aspx

提交回复
热议问题