Reputation: 1
I am using a Java webservice. I'm consuming it with an Excel function which I made using c# and excel-dna. The problem is that everytime I call the function add I get (#valeur)
.
This my c# code source:
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);
}
}
}
Service Reference has been included and the dna and xll files also.
Upvotes: 0
Views: 680
Reputation: 167
Approach debugging this step by step. To debug an Excel DNA method from Visual Studio, you need to:
If you then make a call to your function and it doesn't hit the breakpoint, you may be passing in the wrong parameter types (side note: all numeric values in Excel are doubles - you can always have object parameters and check the arguments in your function).
If it does hit your function then you can step through your client code in the normal way.
Upvotes: 1