我尝试在xlwings装饰器上应用装饰器,但是Excel无法识别UDF。有什么限制
def add_time_decorator(function):
def wrapper():
result = function()
return '%s %s' % (result, datetime.now("%H:%M:%S"))
return wrapper
@add_time_decorator
@xw.func
@xw.arg('table', pd.DataFrame, index=False, header=True)
def UploadTable(name, table):
...
return "%s Saved!" % name