title: How to return an array from a Excel udf?
body: <p>I would like to return a 2d array from my Excel UDF but it only seems to return the 1st element:</p>
  
  <pre><code>public object[,] Get2DArray()
  {         
       object [,] a = new object[2, 2];
       a[0,0] = 0;
       a[0,1] = 1;
       a[1,0] = 2;
       a[1,1] = 3;
       return a;
  }
  </code></pre>
  
  <p>Where invocation looks like:</p>
  
  <pre><code>=Get2DArray()
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>EDIT: the size of the array may change from time to time so I don't want to have to specify the size of the range the result will fill.</p>