我是个新手,既喜欢蟒蛇,也喜欢xlwing。所以故事是,
我需要一个自定义函数需要在Excel中使用。由于我对VB脚本一无所知,所以我决定用python编写一个函数,然后使用xlwing在excel中导入它。
我在python中编写了我的函数
import xlwings as xl
@xl.func
def exponent(x,y):
#the function is an example only. I tried this for practicing and it is also not working
z=x**y
return z我没有得到结果,而是得到了"Object Required“--我不知道出了什么问题?
知道我错过了什么吗?请原谅我的基本问题。
发布于 2018-03-20 12:41:35
您需要在VBA中添加引用。
打开开发人员控制台(Alt-F11),单击“工具”->引用,然后选择
https://stackoverflow.com/questions/45115921
复制相似问题