Jint in Excel

Feb 10, 2010 at 5:40 PM

Hi All,

I am trying to put Jint in Excel. However when I try to call scripts that uses Excel app instance (basically a COM object), I get this error

{"Unable to retrieve security descriptor for this frame.\r\nLine: 1 Char: 0\r\nNo source code available."}

Any thoughts?


Thanks!

 

Coordinator
Feb 11, 2010 at 10:37 AM

Hi,

Can you try to get the source code from the svn repository and use it to get the real error ?
Or you can send us an example of how you are trying to instantiate it.

Thanks,
Sebastien

Feb 12, 2010 at 3:24 AM

I am using AddinExpress to create an Excel addin.

The JavaScript that I want to run is a one liner

return AddinExpress.MSO.ADXXLLModule.CurrentInstance.HostApplication;

Basically I want to return that static property of the COM Excel Application object. I get the following error and stack trace.

{"Object does not match target type.\r\nLine: 1 Char: 0\r\n return AddinExpress.MSO.ADXXLLModule.CurrentInstance.HostApplication\r\n"}

at Jint.JintEngine.Run(Program program, Boolean unwrap) in C:\Downloads\Software\Jint - Sources\Jint\JintEngine.cs:line 251
   at Jint.JintEngine.Run(String script, Boolean unwrap) in C:\Downloads\Software\Jint - Sources\Jint\JintEngine.cs:line 164
   at Jint.JintEngine.Run(String script) in C:\Downloads\Software\Jint - Sources\Jint\JintEngine.cs:line 130
   at Aristotle.ExcelAddin.AristotleXll.XLLContainer.alfg_ExecuteScript(Object script) in C:\Projects\Aristotle\Aristotle.Excel\AristotleXll.cs:line 139

Can you explain briefly how the COM interop works with JavaScript? For example in IronPython I would need to call the function of the Interface supported by the object and pass the instance of the object as the first argument. Is there any documentation on how COM interop works with Jint?

Thank you,

Phat