I am trying to achieve something like this but not sure what the best way is. Pseudo code below:
@xl_func("float a, float b, date c: bool")
def myFunc(a, b, c):
throwAnException (so I can see it in the log)
Return an error message as string and display it in the cell (so the user knows something goes wrong)
return func2(a,b,c) # which returns True or False
The return type in my function argument is bool but I would like to return a string under some conditions (say some inputs are invalid/blank, etc.).
I think changing the return type from bool to var might work, but I am worried about the potential performance impact...
Thank you very much.