At first I implemented UDF, which would call web methods Synchronously , but had a lot of problems with it, especially when I tried to request a huge amount of data - in short, Excel will freeze and hang until all the data is restored, which is serious threatens the user.
I assume that consuming web service synchronously is the real killer here. So I wonder, is there a way I can do this Asynchronously ? Can someone give me some pointers? Any tools or platform preferable? (Personally, I still prefer using C #)
RTD will work. You must implement the IRtdServer interface. When your add-in is running, Excel gives you a pointer to a function. For each cell, you will be assigned an "excel id" and a list of arguments. Submit your asynchronous web request. When the answer arrives, you call the notfiy function that Excel has provided you. When Excel is ready, it will call your GetData method to actually retrieve the data.
See How to create an Excel Automation Add-in in real time in C # using RtdServer? for an example of how to do this in C #.
, RTD, Excel-DNA COM-... .
, , Excel RTD ( ) . , ExcelDNA, . !
# Excel, VBA, , . - udf ( ) - , , , . , , udf, , , Excel, , .
? UDF?
, , (, , ), , , , . , , , ...
.