[英]webservice with exceldna and c#
我正在使用Java Web服务。 我使用我使用c#和excel-dna制作的Excel函数来使用它。 问题是每次我调用函数add I get (#valeur)
。
这是我的C#代码源:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ExcelDna.Integration;
using System.Diagnostics;
using System.ServiceModel;
using System.ServiceModel.Channels;
namespace MyLibrary
{
public class Class1
{
[ExcelFunction(Description = "adds two terms")]
public static int add(int a, int b)
{
ServiceReference1.ServerImplClient client =
new ServiceReference1.ServerImplClient();
return client.addition(a, b);
}
}
}
服务参考已包括在内,dna和xll文件也已包含在内。
逐步调试此步骤。 要从Visual Studio调试Excel DNA方法,您需要:
如果随后调用函数但未达到断点,则可能传递了错误的参数类型(注意:Excel中的所有数值均为双精度型-您始终可以使用对象参数并检查其中的参数)您的功能)。
如果确实起作用,那么您可以按常规方式浏览客户代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.