Can't load xll programmatically

前端 未结 5 494
青春惊慌失措
青春惊慌失措 2021-01-14 12:40

I\'m trying to automating some tests for an Excel add-in, which is in xll form. I have some problem in loading the xll. I\'m writing it in C# and my code looks like this:

5条回答
  •  不思量自难忘°
    2021-01-14 13:31

    Thanks for all the suggestions.

    I solved the problem by changing the default file path for the Excel application.

    Application.xlApp = new ApplicationClass();
    xlApp.DefaultFilePath = "C:\\SomePath";
    xlApp.RegisterXLL("Whatever.xll");
    

提交回复
热议问题