List<string> formulae = new List<string>();
foreach (Microsoft.Office.Interop.Excel.Range r in rng)
{
string formula = r.Formula;
if (FormData.refreshFuncs.Contains(formula.Split('(')[0].Replace("=", "")))
{
r.Value = "=snt(\"refresh\")";
//r.Value = formula;
formulae.Add(formula);
}
}
int i = 0;
foreach (Microsoft.Office.Interop.Excel.Range r in rng) { string formula = r.Formula; if (FormData.refreshFuncs.Contains(formula.Split('(')[0].Replace("=", ""))) { Debug.WriteLine(formula); r.Value = formulae[i]; i += 1; //r.Value = formula; } }Hi Deepak,
I have some questions that will help make sense of your situation:
· What Excel version are you using (Excel 2010 RTM version has a bug related to RTD disconnect).
· Are you using Excel-DNA’s ExcelRtdServer base class for your RTD server, your own implementation of IRtdServer, or using the ExcelAsyncUtil.Run?
· Are you using Excel 2016 – there are some issues with how RTD servers get started in this version.
I’m not sure what you mean by this statement:
“I don't see any option to refresh a RTD cell like other normal udfs.”
· How would you refresh a normal UDF?
If you have a connected RTD topic for every request, you can update the cell by setting a new value on the topic.
If the RTD topic is complete and no longer connected, you should be able to recalculate the cell in the same way you would for a normal UDF.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+unsubscribe@googlegroups.com.
I have some questions that will help make sense of your situation:
· What Excel version are you using (Excel 2010 RTM version has a bug related to RTD disconnect).
· Are you using Excel-DNA’s ExcelRtdServer base class for your RTD server, your own implementation of IRtdServer, or using the ExcelAsyncUtil.Run?
· Are you using Excel 2016 – there are some issues with how RTD servers get started in this version.
I’m not sure what you mean by this statement:
“I don't see any option to refresh a RTD cell like other normal udfs.”
· How would you refresh a normal UDF?
If you have a connected RTD topic for every request, you can update the cell by setting a new value on the topic.
If the RTD topic is complete and no longer connected, you should be able to recalculate the cell in the same way you would for a normal UDF.
I'm uploading a test plugin. Please let me know what do you see in the output.