Hi,
I have developed a prototype C# Excel 2003 add-in in VS2005 that supports an object with some simple calls, plus a separate RTD class, all sitting atop a large existing in-house C# stack.
It all works fine as-is, but...
I'm told that in order to avoid potential conflicts with other Excel add-ins that might want a different .Net run-time that I will have to push .Net code this out-of-proc.
1) Is this true?
2) Can this be done in such a way that the out-of-proc server is launched automatically on demand, is accessable to only the appropriate user (to simplify security issues) and doesn't need elaborate installation, etc, etc?
3) If this can be done, how?
Currently my (COM-visible) class stubs start:
namespace SimpleAddinMockup1
{
/// <summary>
/// Main entry point from Excel for non-real-time methods.
/// </summary>
[ClassInterface(ClassInterfaceType.AutoDual), ComVisible(true)]
public sealed class Main
{
...
}
}
and
namespace SimpleAddinMockup1
{
/// <summary>
/// In-proc real-time server facade for an Excel instance to our main server connection.
/// </summary>
/// Note: to throttle updates in Excel use 'Application.RTD.ThrottleInterval = nnn' for nnn ms between updates (default is 2000).
/// See: http://msdn.microsoft.com/en-us/library/aa140060(office.10).aspx
[ClassInterface(ClassInterfaceType.AutoDual), ComVisible(true)]
public sealed class CPRTDServer : Excel.IRtdServer
{
...
}
}
Update: I would still be very keen to know if pushing the C# outproc is easy to do, eg declaratively...