locked
Opening Excel with C# in Office 2013 does not open it in background RRS feed

  • Question

  • I have an application in C# that writes to Word and Excel in background - I don't want to show any window to the user.

    It works very well with Office 2003 and Office 2010. Now I check it in Office 2013 and the Excel becomes visible (Word not).

    I use very simple code:

    Excel.Application excelApp = new Excel.Application();

    excelApp.Visible = false;

    Workbook excelWorkbook = excelApp.Workbooks.Open(filePathToOpen, 0, false, 5, "", "", false, 
                                                    XlPlatform.xlWindows, "", true, false, 0, true, false, false);

    I try to open it with other parameters too (maybe I miss something).

    I see that the excelApp is always with "Visible - false" until the quit in the end of the code.

    Again - it works in 2003 and 2010 and also works for Word in 2013. Just the Excel becomes visible.

    Maybe someone had similar problem?

    Thanks

    Wednesday, December 3, 2014 5:51 AM

All replies

  • Hello Yurik,

    Did you have a chance to check the list of running processes? Is there Excel.exe before you run the code?

    Could you please also specify the bitness and version (including build numbers) of your Excel? Do you have the latest service packs and updates installed for Office/Excel?

    Wednesday, December 3, 2014 11:47 AM
  • Hi,

    I use Office 2013 version

    15.0.4420.1017 32-bit

    There is no excel process running before my.

    What else can I check?

    Thanks

    Monday, December 8, 2014 7:57 AM