Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

_ExcelBookClose not ending Excel Process


  • Please log in to reply
4 replies to this topic

#1 TSprouse

TSprouse

    Seeker

  • Active Members
  • 8 posts

Posted 10 December 2009 - 09:00 PM

I'm running Win7 (Retail Ver) and Excel 2007

#include <Array.au3> #include <Excel.au3> $oExcel = _ExcelBookOpen("d:\temp\CADStations.xlsx",1) $aryMachines = _ExcelReadSheetToArray($oExcel) _ExcelBookClose($oExcel)


I've tried thesuggestions in this thread... http://www.autoitscript.com/forum/index.php?showtopic=99416&st=0&p=717149

But none of that seems to be working.

does anyone have any other thoughts?


- Travis







#2 Juvigy

Juvigy

    Experimental Drugs Abuser

  • Active Members
  • PipPipPipPipPipPip
  • 1,282 posts

Posted 11 December 2009 - 07:35 AM

$PID = ProcessExists("excel.exe") ProcessClose($PID)


This may also work

$oExcel.Application.Quit


#3 TSprouse

TSprouse

    Seeker

  • Active Members
  • 8 posts

Posted 11 December 2009 - 12:30 PM

$PID = ProcessExists("excel.exe") ProcessClose($PID)


Getting the PID and using Process Close did Work, thank you.


Travis

Edited by TSprouse, 11 December 2009 - 12:30 PM.


#4 queensoft

queensoft

    Seeker

  • Active Members
  • 37 posts

Posted 19 May 2014 - 12:35 PM

Old thread, I know, but I have a new addition / solution.

 

Windows 7 x64, Office 2010, latest AutoIt

Close process using PID did not work for me. If I open an Exccel file after that (using regular double click in Windows Explorer), I get a warning on the left side: Previous file... XLS did not close properly.

But, a simple solution is this - last 2 lines:

$ex01 = _ExcelBookOpen("file.xls", 0) _ExcelBookClose($ex01, 0, 0) $ex01 = ""

After that, exel.exe process is gone from memory in an instant.



#5 DarthCookieMonster

DarthCookieMonster

    I ate your mom's cookie. Nom Nom Nom...

  • MVPs
  • 11,891 posts

Posted 19 May 2014 - 02:55 PM

You know this thread is 5 years old?


The Vollatran project
_____


msg-108-0-96549500-1409901790.png
Obi didn't believe me when I told him the dark side has milk and cookies....





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users