This project has moved and is read-only. For the latest updates, please go here.

Excel Quit event missing ?

Sep 8, 2011 at 3:14 PM

Why is there no Quit event in the Excel assembly ?

I have to handle this to properly dispose of the Excel object in case the user closes the Excel application.

Sep 8, 2011 at 3:18 PM
Edited Sep 8, 2011 at 3:18 PM

In order to prevent naming conflict, every event name in NetOffice has "Event" appended.
for you this means "NetOffice.ExcelApi.Application.QuitEvent"

please take a look in technical information

Sep 8, 2011 at 3:29 PM

There's a Word.QuitEvent but not a Excel.QuitEvent. I first thought it was an intellisense problem (Word.Dispose isn't recognized and more) but it really isn't. (ExcelApi v1.2)

Error 1 'NetOffice.ExcelApi.Application' does not contain a definition for 'QuitEvent' and no extension method 'QuitEvent' accepting a first argument of type 'NetOffice.ExcelApi.Application' could be found (are you missing a using directive or an assembly reference?)

Sep 8, 2011 at 3:40 PM

oh yes now i see the excel application has no quit event. this is not a mistake from netoffice.
microsoft doesnt implement this event in excel. (i dont no why)

i take a look with google about this problem and find some interesstent things

Sep 8, 2011 at 6:10 PM

Thanks, I assumed you had simply forgotten the event - apologies :-)