Andrey Glozman
Posts: 1
Joined: 2010-03-15
|
|
Andrei Smolin
Add-in Express team
Posts: 18821
Joined: 2006-05-11
|
Hi Andrey,
That post suggests sharing code, not object created in code. To share such an object, you can try the following approach:
- in the code of the RTD server you get the current instance of Excel via Marshal.GetActiveObject
- then you call ExcelApp.Evaluate("MyXLL.MyHiddenMethod"). "MyHiddenMethod" is described in the corresponding ADXExcelFunctionDescriptor in your XLL module and has IsHidden=True.
If the info required for the creation of the hashtable can be passed to the RTD server, you could create the hashtable in the code of the RTD server. To hide passing that info from the user, you could wrap the corresponding call by a method of your XLL as shown in http://www.add-in-express.com/docs/net-excel-udf-tips.php#advanced-rtd.
Andrei Smolin
Add-in Express Team Leader |
|