hexagon logo

Checking if the excel is open - here I go again.

Some of our operators do not close the excel before running another part which causes excel to not save data. The data is dent to excel via a script.

How can i check if the excel is open and if so close it?

Thanks
Parents
  • One possible solution with minimal scripting would be:

    1. Save the attached file in example location and change file extension from .txt to .bat.

    2. Then put an external call (see below) in your program and change file path to location of batch file.


    EXTERNALCOMMAND/NO_DISPLAY, NO_WAIT ; C:\FOLDER_WHERE_YOU_SAVE_BATCH\KILL_EXCEL.BAT



    Possible positive/negative, no prompts will be displayed such as SaveAs in excel it will just kill it. Can be used for any process.


    Attached Files
Reply
  • One possible solution with minimal scripting would be:

    1. Save the attached file in example location and change file extension from .txt to .bat.

    2. Then put an external call (see below) in your program and change file path to location of batch file.


    EXTERNALCOMMAND/NO_DISPLAY, NO_WAIT ; C:\FOLDER_WHERE_YOU_SAVE_BATCH\KILL_EXCEL.BAT



    Possible positive/negative, no prompts will be displayed such as SaveAs in excel it will just kill it. Can be used for any process.


    Attached Files
Children
No Data