المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Accessing Excel cell which made call to C# dll ...



C# Programming
03-30-2009, 08:12 AM
I am trying to figure out if there's a way I can keep an Excel cell updated as follows:

I have created a C# dll, with a function: double pf2GetPrice(string ticker) which returns the price of a ticker, when calling this function in a cell in Excel - it works nicely.

To keep the cell value current, I'd like to loop within the dll and update the calling cell's value.

Can this be done? (i'm guessing it must be possible)

I've only come across this so far, but its not a very good tutorial: http://msdn.microsoft.com/en-us/library/bb687861.aspx[^ (http://msdn.microsoft.com/en-us/library/bb687861.aspx)]

Any advice would be much appreciated,

G
C# dll newbie

Find Your Dream Job in Australia, Free!
http://www.webcv.com.au