In excel in cell A1 I have a simple text Hello World.
I write simple UDF function in Pyxll:
from pyxll import xl_func
@xl_func
def get_txt(txt,delimiter,ind):
l=txt.split(delimiter)
return l[ind]
When i call this function in excel =get_txt(A1;" ";0) i get error: TypeError list indices must be integers or slices,not float
But in python this code works fine. Please help how fix this error. Thanks all for help.
Thanks everyone, solution found: need to add annotation
but in xlwings it doesn't work((