Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an Excel workbook that launch an external .exe. My .exe is
written in c#. My application need a reference to the excel applicationthat just call it. When calling the external .exe (my c# application) from Excel, i'm passing the Excel PID in arguments. In c# i'm able to get the Excel process with Process.GetProcessById(pid) but i don't know how to cast it back to an Excel application Object. ex : appExcel = (Excel.Application)(Process.GetProcessById(pid)) this doesn't work. I need something like that but with the process pid : appExcel = (Excel.Application)Marshal.GetActiveObject("Excel. Application"); Thanks, Tommy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not sure what you are trying to do. Are your trying to set up a pipe? Maybe
a better approach is to use a semiphore to synchronize the two processes and transfer data. Use a file to act as the semiphore. " wrote: I have an Excel workbook that launch an external .exe. My .exe is written in c#. My application need a reference to the excel applicationthat just call it. When calling the external .exe (my c# application) from Excel, i'm passing the Excel PID in arguments. In c# i'm able to get the Excel process with Process.GetProcessById(pid) but i don't know how to cast it back to an Excel application Object. ex : appExcel = (Excel.Application)(Process.GetProcessById(pid)) this doesn't work. I need something like that but with the process pid : appExcel = (Excel.Application)Marshal.GetActiveObject("Excel. Application"); Thanks, Tommy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Casting Problem in VBA | Excel Programming | |||
Changing text to number format using type casting | Excel Programming | |||
Casting in an Excel ADO SQL Command | Excel Programming | |||
How to count process running time ( process not finished) | Excel Programming | |||
How to count process running time ( process not finished) | Excel Programming |