Hi Govert/Excel DNA users,
I would like to ask a question:
Is it possible to return bigger matrix than selected area/cells for given matrix formula.
I have Excel DNA UDF that in runtime will resolve how many row will be returned, for instance:
public static object[,] GetSurnames(string firstName)
string surnames = Database.GetSurnames(firstName);
object[,] resultArray = new object[surnames.Length,1];
for (int i = 0; i < surnames.Length; i++)
resultArray[i,0] = surnames[i];
So lets say, that user selected 3 cells in 3 rows (3x1), entered formula and pressed ctrl + shift + enter.
UDF will process parameter and get from DB lets say 5 results which I want to return as result of matrix fuction as 5x1 matrix.
So is it possible to change size of return matrix so it wasnt be limited by selected area by user ?
Or is it possible to change selected area before returning object array by UDF ?
Thanks for any reply