I'm working on an Excel add-in and I'm using the Excel COM interface to do automate some testing. So I'll do something like (all through calls to the Excel COM interface):
- Create a new Excel instance
- Load my XLL add-in
- Create a workbook
- Set some worksheet formulae
- Check that I get the expected results
Now I want to test that my add-in is correctly responding to user cancel requests, i.e. when the user presses escape while a function is calculating the function should abort.
How can I simulate a user pressing escape using the Excel COM interface?
I'm using Python to write my tests, but I don't think that's relevant.