C# 除非手动更改,否则不会更新新值

C# 除非手动更改,否则不会更新新值,c#,xml,excel,excel-dna,rtd,C#,Xml,Excel,Excel Dna,Rtd,我在..\dsitbution\Samples\RTD\中使用名为TestRTD.dna的cookie cutter excelDNA解决方案 我将GetEurOnd()扩充为: public static object getTestObject(String arg){ return GetTestItem(arg); } 其中,GetTestItem()保持不变 我的XML采用以下格式: <?xml version="1.0" encodin

我在
..\dsitbution\Samples\RTD\
中使用名为
TestRTD.dna
的cookie cutter excelDNA解决方案

我将
GetEurOnd()
扩充为:

  public static object getTestObject(String arg){
    return GetTestItem(arg);
  }
其中,
GetTestItem()
保持不变

我的XML采用以下格式:

            <?xml version="1.0" encoding="utf-8"?>
            <ISIN>
              <US05574LFY92>
                <ID_ISIN>US05574LFY92</ID_ISIN>
                <A>40</A>
                <B>100.089004516602</B>
                <C>11:22:48.000</C>
              </US05574LFY92>
            </ISIN>
它成功地更新了XML文件中的值,但是excel中的公式仍然显示旧值

如果我进入我的XML文件并手动更新值,那么新值将通过flow进入excel

知道我做错了什么吗


撞墙。

如果在使用XmlWriter代码更新文件后将公式放入Excel,它会显示正确的结果吗?要检查驱动RTD更新的计时器是否正确运行,可以在结果中添加一个
DateTime.Now
字符串。@Govert否更新C#代码后,不会显示正确的结果。这正是问题所在。我有
DateTime。现在
,但在手动工作后将其删除。是否生成的xml文件不再与该示例中的
SelectSingleNode
选择器匹配?实际上每次节点都是相同的<代码>等
            using (XmlWriter writer = XmlWriter.Create(recordPath))
            {
                writer.WriteStartDocument();
                writer.WriteStartElement("ISIN");

                foreach (rtTrace.dataObj d in lines)
                {
                    writer.WriteStartElement(d.ID_ISIN);

                    writer.WriteElementString("ID_ISIN", d.ID_ISIN);


                    writer.WriteElementString("A", d.A);
                    writer.WriteElementString("B", d.B);
                    writer.WriteElementString("C", d.C);


                    if (!tmp.ContainsKey(d.ID_ISIN))
                    {
                        tmp.Add(d.ID_ISIN, "");
                    }

                    writer.WriteEndElement();
                }
            }