How to "link" to an already open Excel.Application with Interop c#
I can create an instance of Excel using:
Microsoft.Office.Interop.Excel.Application gXlApp = new Microsoft.Office.Interop.Excel.Application();
gXlWb= gXlApp.Workbooks.Add(Missing.Value);
gXlApp.Visible 开发者_JAVA百科= true;
gXlApp.DisplayAlerts = false;
BUT is there a way to "point" gXlApp at an instance of Excel that is already open?
Currently I have to start Excel from c# then open the workbook and run my code.
精彩评论