Hello,
I created a new Excel application with:
Application xlApp = new Application ();
Workbooks wbs = xlsApp.Workbooks;
Workbook wb = wbs.Add (1);
...
If the user opens "by hand" an Excel file, it will open in this instance.
If an Excel file is opened before the code is executed, then it is in it that will open Excel files.
In summary, Excel files open :
- in a new instance if there was not before
- in the first instance of Excel open
So I would make my Excel xlApp "default" for open Excel file, especially if another instance of Excel is opened before.
thank you,