jeudi 6 juin 2019

How to load interop.excel.dll with Loadfrom

How to use the Assembly.Gettype?

I have read the microsoft references and do not know, why myExcelType is allways NULL. The dll should be loaded, because myAssembly.GetName() is working fine.

        Assembly myAssembly = Assembly.LoadFrom(@"D:\Microsoft.Office.Interop.Excel.dll");

        Type myExcelType = myAssembly.GetType("Microsoft.Office.Interop.Excel.ApplicationClass");

        object myExcelObj = Activator.CreateInstance(myExcelType);





Aucun commentaire:

Enregistrer un commentaire