Created an Excel progress bar class using CreateWindowEx API function, based on Randy Birch’s source code. I haven’t had time to implement 64 bit versions of the APIs, but let me know if you need it in a comment below and I will try to find some time.
I created a C# class to handle some of missing Excel application level events such as : Workbook close, worksheet rename, worksheet delete, range name added, range name deleted, application activated, application deactivated.
Excel does offer a workbook closing event, but the user can cancel it. The workbook closed event fires when the workbook actually closes.
Usage is fairly straightforward :
ExcelApplicationEvents _appEvents = new ExcelApplicationEvents(_app, ApplicationEvents.WorkbookClosed); _appEvents.WorkbookClosed += _appEvents_WorkbookClosed;
Using the APIs, file information strings such as file description, product version, product name, and copyright information can be retrieved. The code was inspired by Randy Birch.
Tested with both 32 and 64 bit Office environments.