dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: EXCEL.EXE process

  1. #1
    Join Date
    Mar 1999
    Posts
    19

    EXCEL.EXE process

    I create an excel spreadsheet from a MFC program. In my deconstructor I have


    CExcelSetup::~CExcelSetup()
    {
    ExcelSave();
    ExcelWorkbooks.Close();
    ExcelApp.SetVisible(false);
    ExcelApp.Quit();
    }




    But EXCEL.EXE stays in the process window in Task Manager but doesn't show up as an application still running. How do I get rid of this process in my program?

    Thanks


  2. #2
    Join Date
    Mar 2001
    Posts
    44

    Re: EXCEL.EXE process

    Hi,

    Have you tried finding and killing the process id of the exe?

    J


  3. #3
    Join Date
    Aug 2000
    Posts
    393

    Re: EXCEL.EXE process

    Create an ExitProg function and add your cleanup code to it followed by a pause:


    ExcelSave();
    ExcelWorkbooks.Close();
    ExcelApp.SetVisible(false);
    ExcelApp.Quit();
    Sleep(250);
    OnOK;




    I'm not positive this will work, but it solved a similar problem I had with ShellExecute.

    mr. blonde


  4. #4
    Join Date
    Mar 1999
    Posts
    19

    Re: EXCEL.EXE process

    Yes, but I don't want to have to kill 20 processes after each execution of the program.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)