Y
Yaris Sabzposh
Hi,
I have several excel processes running, and I would like to have an option
to choose from that list. I am able to get the list of processes and I can
choose which process I want, but the problem starts when we try to
cast/convert that process into an excel object.
I can use the following:
xlApp = (Excel.Application)
(Microsoft.VisualBasic.Interaction.GetObject(null, "Excel.Application"));
but that'll give me the first instance of excel, not the 3rd or 4th or nth
instance that I would like to get a handle on.
Is there a way of doing that in C#? I know in VB we can write:
Set xlApp = GetObject("book2").Application
and it'll get us the excel workbook/process with the name "book2".
I would really appreciate if someone can help me out here.
Thanks.
--Yaris
PS: Sorry if I'm posting in the place.
I have several excel processes running, and I would like to have an option
to choose from that list. I am able to get the list of processes and I can
choose which process I want, but the problem starts when we try to
cast/convert that process into an excel object.
I can use the following:
xlApp = (Excel.Application)
(Microsoft.VisualBasic.Interaction.GetObject(null, "Excel.Application"));
but that'll give me the first instance of excel, not the 3rd or 4th or nth
instance that I would like to get a handle on.
Is there a way of doing that in C#? I know in VB we can write:
Set xlApp = GetObject("book2").Application
and it'll get us the excel workbook/process with the name "book2".
I would really appreciate if someone can help me out here.
Thanks.
--Yaris
PS: Sorry if I'm posting in the place.