View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vyyk Drago[_2_] Vyyk Drago[_2_] is offline
external usenet poster
 
Posts: 1
Default Want to launch Excel from C# app

Stefani,

Add the following line of code:

excelApp.Visible=true;

Interop usually starts up Office applications invisibly, i.e. the process
for the application starts, but you have to make it visible programmatically.

Hope this helps.

Regards
Vyyk

"Stefani" wrote:

For now, I simply want to launch Excel from a C# windows application. I've
found the MS Office Interop libraries with no documentation.

I'm expecting the following code to open the c:\temp.xls:

ApplicationClass excelApp = new ApplicationClass();
excelApp.Workbooks.Open("c:\\temp.xls",Type.Missin g,Type.Missing,Type.Missing,Type.Missing,Type.Miss ing,Type.Missing,Type.Missing,Type.Missing,Type.Mi ssing,Type.Missing,Type.Missing,Type.Missing,Type. Missing,Type.Missing);


What I'm getting is an EXCEL.EXE process started, but Excel never launches.

I'm trying to simply and quickly implement this as a part of a prototype app
where resulting data is displayed using Excel.

Any help would be appreciated.

Thanks.