C# Excel RTD Server Multiple Instances disconnect all formulas on one sheet stops formulas on the other
By : Bilaal_Latif
Date : March 29 2020, 07:55 AM
seems to work fine Assuming that your RTD functions are wrapped with a UDF, one solution would be to assign each worksheet an identifier (a Guid, for example) from within the UDF call. You can persist the identifier as a custom worksheet property and then add it to each outgoing RTD topic, which will result in a unique set of topics for each worksheet when they arrive at your RTD server. Accessing a custom worksheet property with each RTD call will have a performance impact when processing large numbers of functions, however, so you should cache the identifier for a short period of time to mitigate this. One way to do this is to maintain a dictionary lookup keyed by worksheet object. Within the scope of each UDF call, get the worksheet that the calling cell is associated with via the Application.Caller property (cast it to a Range and get the worksheet property from it), and then lookup the identifier in the dictionary.
Using VBA in Excel to run formulas - Formulas not working until reference cell activated