I am trying to read an Excel file from Revit 2017 API, using Revit Python Shell. Basically, I have no idea of what I'm doing, but I tried this: http://wiki.theprovingground.org/revit-api-py-excel , but I'm getting an error:
Traceback (most recent call last): File "", line 1, in EnvironmentError: System.Runtime.InteropServices.COMException (0x800401F3): Invalid class string (Exception from HRESULT: 0x800401F3 (CO at System.Runtime.InteropServices.Marshal.CLSIDFromProgID(String progId, Guid& clsid) at System.Runtime.InteropServices.Marshal.GetActiveObject(String progID) at Microsoft.Scripting.Interpreter.FuncCallInstruction`2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Hosting.PythonCommandLine.<>c__DisplayClass1.b__0()
when running: System.Runtime.InteropServices.Marshal.GetActiveObject('Excel.Application')
I am doing this on a Windows 7 machine.
On side of that, I tried pretty much every module I found on the web, that are supposed to help opening xlsx files, but every time I'm getting and error at some point. Can anybody help on that? It can be ods files as well.
Thanks! Arnaud.