Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide Excel 2013 while programmatic change a workbook

Tags:

c#

excel

interop

A really good new feature of Excel 2013 is that it cannot forced to show more than one Excel workbook in one application. This seems the cause of my Problem:

If I open an Excel workbook programmatically using c# and interop Excel 2013 starts with a new application window. I can working with the workbook in code without problems but I want to hide the application. Using

   Excel.Application excelApp = new Excel.Application();
    ......
    excelApp.Workbooks.Open(...);
    excelApp.Visible = false;

hides the application window after showing it. Is there a way to stop showing the application as in Excel 2010 or earlier Version?

like image 744
Harald Pitro Avatar asked Feb 23 '26 18:02

Harald Pitro


1 Answers

In my Excel 2013, using excelApp = new Excel.Application doesn't show any window.

May it be some VBA code in opened workbook which displays window?

like image 61
LS_ᴅᴇᴠ Avatar answered Feb 25 '26 08:02

LS_ᴅᴇᴠ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!