如果尝试做示例我有错误 http://docs.xlwings.org/en/stable/vba.html
---------------------------
Error
---------------------------
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python3\mymodule.py", line 7, in rand_numbers
n = int(Range('Sheet1', 'B1').value) # Write desired dimensions into Cell B1
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
答案 0 :(得分:0)
我建议由于单元格中的缺失值而发生错误。在转换为int之前,请尝试检查值是否为{{1}}。