water Posted July 30, 2015 Share Posted July 30, 2015 Then back to my question from post #18. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
mpower Posted July 30, 2015 Share Posted July 30, 2015 Then back to my question from post #18.There's no @error as the _Excel_Close function returns 1. Link to comment Share on other sites More sharing options...
water Posted July 30, 2015 Share Posted July 30, 2015 (edited) I justed tested wih Excel 2010 on Windows 7 64 bit. Works fine.Is there anything special in the Excel workbook like macros etc?Which version of AutoIt do you run?Do you run the 32 or 64 bit version of Excel? Edited July 30, 2015 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
mpower Posted July 30, 2015 Share Posted July 30, 2015 (edited) I justed tested wih Excel 2010 on Windows 7 64 bit. Works fine.Is there anything special in the Excel workbook like macros etc?Which version of AutoIt do you run?Do you run the 32 or 64 bit version of Excel?Hmm.. No, nothing special, even an empty workbook still has the same result.AutoIt is latest: v3.3.14.1Excel 2013 15.0.4737.1000 32-bitWindows 7 64-bit I've added some checks and my results are further down below$aProcesses = ProcessList("Excel.exe") ConsoleWrite($aProcesses[0][0] & " Excel instance(s) running." & @CRLF) ConsoleWrite('Started Processing ' & $file & @CRLF) $oExcel = _Excel_Open(False, False, False, False, True) $oWorkbook = _Excel_BookOpen($oExcel, $file, True) $aOrgArray = _Excel_RangeRead($oWorkbook) $oWorkbook = _Excel_BookClose($oWorkbook, False) $oExcelClose = _Excel_Close($oExcel, False, True) Sleep(2000) ConsoleWrite('Finished Processing ' & $file & @CRLF) ConsoleWrite('$oExcelClose=' & $oExcelClose & ' | @error=' & @error & ' | @extended=' & @extended & @CRLF) $aProcesses = ProcessList("Excel.exe") ConsoleWrite($aProcesses[0][0] & " Excel instance(s) still running." & @CRLF)Console result:0 Excel instance(s) running.Started Processing C:\Blank Workbook.xlsx_Excel_Open() triggered__Excel_CloseOnQuit triggered. $bNewState=True_Excel_BookOpen() triggered_Excel_BookClose() triggered_Excel_Close() triggered. $bForceClose=True__Excel_CloseOnQuit triggered. $bNewState=Default__Excel_CloseOnQuit triggered. $bNewState=FalseFinished Processing C:\Blank Workbook.xlsx$oExcelClose=1 | @error=0 | @extended=01 Excel instance(s) still running. I have also confirmed that this behaviour is unique to having a 32-bit version of Office on a 64-bit version of Windows. Another system that has both 64-bit OS and 64-bit Office appears to work fine. So it's a mixed software architecture issue. Any ideas on how to resolve? Edited July 31, 2015 by mpower Link to comment Share on other sites More sharing options...
mpower Posted July 31, 2015 Share Posted July 31, 2015 (edited) EDIT: Sorry ignore this post - notified mod to delete - posted wrong information Edited July 31, 2015 by mpower Link to comment Share on other sites More sharing options...
water Posted July 31, 2015 Share Posted July 31, 2015 Would it be possible to test this with AutoIt 3.3.12.0? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
JohnOne Posted July 31, 2015 Share Posted July 31, 2015 As a sanity check, add #RequireAdmin to script. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
mpower Posted July 31, 2015 Share Posted July 31, 2015 (edited) Would it be possible to test this with AutoIt 3.3.12.0?Just tested with 3.3.12.0 and no change in behaviour. Excel.exe still remains in Task Manager.As a sanity check, add #RequireAdmin to script.Tried with #RequireAdmin also - no change. Edited July 31, 2015 by mpower Link to comment Share on other sites More sharing options...
TheDcoder Posted July 31, 2015 Share Posted July 31, 2015 @mpower Why not use this?:Run(@ComSpec & " /c " & 'taskkill /im excel.exe /f /t', "", @SW_HIDE) EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
JohnOne Posted July 31, 2015 Share Posted July 31, 2015 Because ProcessClose would be sufficient to do that, but would not guarantee closing the correct instance.Also, the point is that it should work, but it appears not to be. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted July 31, 2015 Share Posted July 31, 2015 I forgot I had Excel installed. I tried it on version 3.3.12.0 and it closes fine for me whether I close the workbook or not, or whether I set $bForceClose to true or false. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
mpower Posted July 31, 2015 Share Posted July 31, 2015 I forgot I had Excel installed. I tried it on version 3.3.12.0 and it closes fine for me whether I close the workbook or not, or whether I set $bForceClose to true or false.Are you running 32-bit Office on 64-bit Windows though? Link to comment Share on other sites More sharing options...
JohnOne Posted July 31, 2015 Share Posted July 31, 2015 No. both 32 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
water Posted August 1, 2015 Share Posted August 1, 2015 I forgot I had Excel installed. I tried it on version 3.3.12.0 and it closes fine for me whether I close the workbook or not, or whether I set $bForceClose to true or false.You are talking about Excel 2013? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
JohnOne Posted August 1, 2015 Share Posted August 1, 2015 Yes, Excel 2013. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
water Posted August 1, 2015 Share Posted August 1, 2015 JohnOne,would it be possible to test with 3.3.14.1? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
JohnOne Posted August 1, 2015 Share Posted August 1, 2015 Sure, I'll install it now. and report back. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
water Posted August 1, 2015 Share Posted August 1, 2015 Thanks a lot!We will then know (hopefully) if the problem is Autoit or Excel related. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
JohnOne Posted August 1, 2015 Share Posted August 1, 2015 Tried it a dozen times, it closed just fine on each occasion.Tried with $bForceClose true and false, and with excel visible and not.Exactly as I did with 3.3.12.0 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted August 1, 2015 Share Posted August 1, 2015 Thinking back, when I was working on a project with excel (I'm sure you were helping me) I had similar problem to OP.I'll try to find the thread. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now