I am using os.startfile(excel file) to open excel application. After running task kill, when I try to open excel again it gives me recovery options.
Is there any way to open the excel application and close it properly without giving recovery option when I open it again?
with the argument /F you force kill the program, not giving it time to save things or clear memory etc.
what os.system('taskkill /T /IM EXCEL.exe) does is it sends the same singnal as the program gets when you press the close program button
os.system('TASKKILL /F /IM EXCEL.exe') in python