Argument Names

May 12, 2013 at 6:00 PM
Hello,

I want to know if there is a way to give dymanic names to the arguments?

[ExcelDna.Integration.ExcelArgument(Name = "Teste", Description = "(Obrigatório)")] string Conta,

I want to give a name for that field "Teste" with names that are in array. Is that Possible?

Thanks,
Dias
Coordinator
May 12, 2013 at 6:30 PM
Hi Dias,

It's possible but not so easy yet. See this discussion: https://groups.google.com/group/exceldna/browse_thread/thread/3467091be9a85053

You need a recent check-in from here: https://exceldna.codeplex.com/SourceControl/list/changesets , and then call ExcelIntegration.RegisterMethods(...) with the right information.

One day I hope it will be easier....

Regards,
Govert
May 12, 2013 at 7:47 PM
Thanks for your response, but I check teh information but I can´t understand that information.
When we use RegisterMethods, we can create Lists, after, The ExcelArgument is repalced?

Best regards,
Dias
Coordinator
May 12, 2013 at 8:32 PM
Edited May 12, 2013 at 8:32 PM
Hi Dias,

Like I said, it's not easy.

The new overload of ExcelIntegration.RegisterMethods has these parameters:
  • a list of MethodInfos to register
  • a list of ExcelFunctionAttribute or ExcelCommandAttribute objects, one for each MethodInfo,
  • a list of ExcelArgumentAttribute lists, one list for each MethodInfo.
Regards,
Govert
May 16, 2013 at 8:31 AM
Hi Govert,

There is some example code already done in order to get some ideas?

Best regards,
Dias