[英]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.