【发布时间】:2017-09-15 09:08:18
【问题描述】:
我正在尝试使用 Revit Python Shell 从 Revit 2017 API 读取 Excel 文件。基本上,我不知道自己在做什么,但我试过这个:http://wiki.theprovingground.org/revit-api-py-excel,但我收到了一个错误:
Traceback(最近一次调用最后一次): 文件“”,第 1 行,在 EnvironmentError:System.Runtime.InteropServices.COMException(0x800401F3):无效的类字符串(来自 HRESULT 的异常:0x800401F3(CO 在 System.Runtime.InteropServices.Marshal.CLSIDFromProgID(字符串 progId,Guid & clsid) 在 System.Runtime.InteropServices.Marshal.GetActiveObject(字符串 progID) 在 Microsoft.Scripting.Interpreter.FuncCallInstruction`2.Run(InterpretedFrame 框架) 在 Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame 框架) 在 Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,Tret](T0 arg0, T1 arg1, T2 arg2, T3 arg3) 在 IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame 框架) 在 Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame 框架) 在 Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,Tret](T0 arg0, T1 arg1) 在 IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) 在 IronPython.Hosting.PythonCommandLine.c__DisplayClass1.b__0()
运行时: System.Runtime.InteropServices.Marshal.GetActiveObject('Excel.Application')
我在 Windows 7 机器上执行此操作。
除此之外,我几乎尝试了我在网上找到的每个模块,这些模块应该有助于打开 xlsx 文件,但每次我都会在某些时候出错。有人可以帮忙吗?它也可以是 ods 文件。
谢谢! 阿诺。
【问题讨论】: