Groups | Blog | Home
all groups > dotnet interop > august 2003 >

dotnet interop : Automating Excel WorkBook Suppress Excel Message Boxes Possible?


unemotionalhumanoid
8/27/2003 11:45:01 PM
I am writing an application that gets data from excel worksheets, it works
fine for most workbooks but when I open some by using the following line of
code:

_xlApp = new Excel.ApplicationClass();

Excel.Workbook WorkBook1 = _xlApp.Workbooks.Open(FilePath,0,true, 5,"",
"", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, false, false,
false);

Excel produces a message box saying:

Microsoft Office Excel recalculates formulas when opening files last
saved by an earlier version of excel (Yes / NO / Cancel)

Is there any way to suppress these annoying message boxes?

Thank you

Scott Glasgow
8/28/2003 9:30:32 AM
Try _xlApp.DisplayAlerts = false;

[quoted text, click to view]

AddThis Social Bookmark Button