Jump to content

Cannot resolve error "IronPython.Runtime.Exceptions.ImportException: No module named Office


Joy Barua

Recommended Posts

Hello Community,

i am trying to create a script to load data from excel into spotfire.

MY server currently does not have any office application installed on it.

using Spotfire i am able to load the data from excel.

but when i try to use the script "from Microsoft.Office.Interop import *"

i get the error

below

Traceback (most recent call last):

File "", line 10, in

ImportError: No module named Office

 

IronPython.Runtime.Exceptions.ImportException: No module named Office

at IronPython.Runtime.Importer.ImportModuleFrom(CodeContext context, Object from, String[] parts, Int32 current)

at IronPython.Runtime.Importer.ImportModule(CodeContext context, Object globals, String modName, Boolean bottom, Int32 level)

at IronPython.Modules.Builtin.__import__(CodeContext context, String name, Object globals, Object locals, Object fromlist, Int32 level)

at Microsoft.Scripting.Interpreter.FuncCallInstruction`7.Run(InterpretedFrame frame)

at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)

at Microsoft.Scripting.Interpreter.LightLambda.Run7[T0,T1,T2,T3,T4,T5,T6,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)

at IronPython.Runtime.Importer.ImportLightThrow(CodeContext context, String fullName, PythonTuple from, Int32 level)

at IronPython.Runtime.Operations.PythonOps.ImportStar(CodeContext context, String fullName, Int32 level)

at Microsoft.Scripting.Interpreter.ActionCallInstruction`3.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 Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)

at Spotfire.Dxp.Application.IronPython27.IronPythonScriptEngine.ExecuteForDebugging(String scriptCode, Dictionary`2 scope, Stream outputStream)

 

I have tried installing Microsoft Aceoledb driver

also manually copy pasting the dll-Microsoft.Office.Interop.Excel.dll to the system folder

none of them work.

is there a different way to do this

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...