com - How to run a hosted ironpython 1.1 from an Excel add-in? -
I am writing an Excel add-in that hosts IronPathon 1.1 and I want to provide Excel. Python Engine Example for the Epilation COM object.
Members of my C # COM object can use just properly. However, when my Iron Pathon script accesses members of the COM object, I get a "System.Agentement: Object Type 'System.Int32' is called 'System.UInt32 & amp; Can not be changed to type. "
Here my C # Hosting Hosting IronPython 1.1:
Public Zero ExecuteFile (string path) {// See that COM object debugs. WrititeLine (Globals.ThisAddIn.Application.ActiveWindow.Caption); Engine. Globe Add ("Excel", Globals, this addin.app); Try {engine.ExecuteFile (path); } Hold (exception preceding) {Debug.WriteLine (former); }} And here is my IronPathon Test Script:
excel.ActiveSheet.Range ['A1']. Value2 = 42 /
I believe that to set up. The value you need with "index" is the data type; It is more convenient to set up. Instead, the value 2 (it can be set directly). So what happens if you use .Value2 instead of .value in that python assignment?
Comments
Post a Comment