I am planning to develop a function in C# which will return a tw开发者_StackOverflowo dimensional array. This new C# function will be called through VB script. Also the length of the returned array will be dynamically changed so I am not sure how to return this array to vbscript.
Any insight on approach/pseudo code will be of great help. Thanks.
I would recommend looking at a specialised solution for C# and VBA like ManagedXLL, ExcelDNA etc if you are going to be doing more of this in the future.
This will help you easily create an in-process XLL that can be called from Excel / VBA directly.
Otherwise you could also call a web service instead as the 2003 Web Services Toolkit is very easy to set up too.
精彩评论