Results 1 to 4 of 4
  1. #1

    Issue with CloseProcessByName(\"Excel.exe\")

    Hi Everybody,

    I am creating an object for the excel file in the script. When the script stops because of any error or if I stop the script execution and reexecute the scripts I am getting message "Do you want to save the changes you made to ResultLog.xls". I am using SystemUtil.CloseProcessByName("Excel.exe") statement for closing all the opened excel worksheets.

    Anybody pls let me know how can I close the excel worksheets forcibly so that I should not get the above error.

    Thanks in Advance.


  2. #2

    Re: Issue with CloseProcessByName(\"Excel.exe\")

    This is not an effective way of closing the excel file. If there are multiple excel files open on the desktop then this will close only one of them. You can write a clean up function which will execute if any error occurs during execution. For this approach obviously you need to initiate error handling.

  3. #3

    Re: Issue with CloseProcessByName(\"Excel.exe\")


    Thanks for you reply.Actually I need to close all the excel files which are opened before the script execution. What I am asking is the object which is created in previous execution is still in process and if I use SystemUtil.CloseProcessByName("Excel.exe") statement in the next execution I am getting the above mentioned message.Is there any way to close the excel forcibly.


  4. #4

    Re: Issue with CloseProcessByName(\"Excel.exe\")

    Please check here:

    O.K. Tested!



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 04:02 PM.

Copyright BetaSoft Inc.