I'm trying desperately to do this.
I've been able to replicate the behavior found on this post.
http://damianblog.com/2009/07/05/excel-wcf/comment-page-1/#comment-64232
however, I am unable to pass an array to an exposed wcf function.
My WCF Service works like this (I have also tried to use arrays of int)
public object[] GetSomeArray()
{
return new object[] { 1, 2, 3, 4};
}
public object[] ReturnSomeArray(object someArray)
{
object[] temp = (object[]) someArray;
for (int i = 0; i < temp.Length; i++)
{
temp[i] = (int)temp[i] + 1;
}
return temp;
}
my VBA code looks like this.
Dim addr As String
...
Dim service1 As Object
Set service1 = GetObject(addr)
Dim columnsVar
columnsVar = Array(1, 2, 3)
Dim anotherArray As Variant
anotherArray = service1.ReturnSomeArray(columnsVar)
I always have problems on the last line above. I don't understand why if I'm able to return an array from my WCF service that I'm not able pass that same array as a parameter to another WCF function.

I am getting a serialization error.
Any help would be appreciated.
public object[] ReturnSomeArray(object someArray)and then cast someArray to object[] or see what's the type really is