Here is the use case for why I need to do it.
I am writing a UDF which will use an API to pull data from the Cloud. The data will be returned as a Json string which the function will convert into a 2D Array. The number of colums in the array will be fixed whereas the number of rows will vary, depending on the input parameter to the API.
Now I have two choices to return the data back to the Excel sheet from the UDF
1. Return the array and the use Ctl+Shift+Enter in Excel to mark the cells where the array will be displayed
2. Have the UDF print the array to Excel, given some cell as a starting point
Since the number of rows returned by the API are variable I cannot use option 1. Hence I am constrained to use option 2.