Can't load xll programmatically

前端 未结 5 492
青春惊慌失措
青春惊慌失措 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:14

    I know this is not a direct answer to your question, but you may want to look at using VSTO within Visual Studio. VSTO automates a lot of these types of issues. The version in VS 2010 is so much better than what they used to have and you can built application level add-ins as opposed to just document level add-ins. If you need user defined functions you can use a COM add-in as described here:

    http://blogs.officezealot.com/whitechapel/archive/2005/04/10/4514.aspx

    It was originally based on this article:

    http://blogs.msdn.com/eric_carter/archive/2004/12/01/273127.aspx

    We use a combination of VSTO for our main application, and the COM add-in for user defined functions. What's nice about that is that they are loaded in the same app domain so they can talk to each other.

提交回复
热议问题