Hi,
I have a question about the utilisation of *args and **kwargs argument in excel from a python function. I try to use a function that returns a value from a dict where I can have more than 1 key.
I have this python function :
def get_value(material, **keys):
global catalogue_data
try:
if catalogue_data is None:
return "Catalogue non initialisé"
value = catalogue_data[material]
for key in keys:
value = value[keys[key]]
return str(value)
except Exception as e:
return f"Erreur: {e}"
in excel i use this formula for exemple :
=get_value("C50";"E 0,mean")
OR
=get_value(D7;E7) where D7 = "C50" and E7 =
"E 0,mean"
it works very well !
When i tried to use a second 'keys' arguments it doesn't works, i tried :
=get_value("C50";"Classe de service 1";"k def")
or
=get_value("C50";"Classe de service 1""k def")
or
=get_value("C50";["Classe de service 1""k def"])
Do you thinks it's possible to use *args and **kwargs arguments in excel ?
thanks for your help,
BODSON Romain