尝试获取 .py 文件时出现 UDF 错误

UDF Error when trying to pick up the .py file

我已按照说明进行操作 here,一切都很顺利,直到我点击 Import Python UDFs 时 我收到以下错误:

Run-time error '1004': Cannot run the macro 'xlwings-test.xlsm!ImportPythonUDFs'. The macro may not be available in this workbook or all macros may be disabled.

当然,我启用了 Trust access to the VBA project object model,这是我应该启用的。 此外,当我键入 ALT+F11 时,我看到 xlwings.xlam 已加载。

Excel版本:15.0.4779.1001 64位,xlwings版本0.6.2,Win 8.1.

这是由文件名中的一些非标准字符(如空格、破折号)引起的。它将在下一个版本中修复。现在只需重命名文件。