Lights_On

_Excel_BookOpenEX Error then crash

16 posts in this topic

Hi All,

I am using autoit v3.3.14.2 on w7 machine and am using the updated _Excel_BookOpenEX function.

I am getting an error that causes my script to crash

Quote

“!>13:10:46 AutoIt3.exe ended.rc:-1073741819”

The trace line error report gives:

Quote

 

@@ Trace(2702) :            Local $oWindow = $oExcel.Windows($oWorkbook.Name) ; <== Modified

>Error code: -2147352568

 

This section is from within _Excel_BookOpenEX function.

I belive the error code to mean:

Quote

-2147024809 0x80070057  One or more arguments are invalid.

But not certain if that is correct.

The call prior to the fail is:

Local $ContractorCopy_FileToOpen = _Excel_BookOpenEX($oExcel, @ScriptDir & "\Contractors\" & $nameis, False, True)

This part of the script loops through multiple excel files extracting information from them.  It works fine if there are around 25 files, but if over that it seems to crash as described here.  All files are the same just with different data in them, but all follow the same format so I know it is not any one file causing the issue.

Any ideas?

Share this post


Link to post
Share on other sites



That's a known bug with AutoIt 3.3.14.2. If a COM error occurs in a nested statement then AutoIt is unable to handle this error and crashes. 

Don't ask me why but somehow your Workbook doesn't seem to have a (valid) name. How do you create the Workbooks?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Okay good to know its not me then.

I use a template that is added to.  So I have originally created a basic excel file with excel 2010, saved it.  It is then used like a template in the script, it is opened, edited, saved as a different name, then the original closed without changes being saved.  It is these files that are being opened for use when this error happens.

 

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Need to check why a Workbook has no name and handle this in the UDF. Will take some time as I'm on vacation right now. 

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Hi Water, Once again I really appreciate that thank you.  I am very grateful for your looking into this for me and I eagerly await your thoughts and any solution you may find.

In the mean time could i use an older version of autoit to get around this issue?  if so what version should i use?

Thank you and have a great vacation.

Share this post


Link to post
Share on other sites

3.3.12.0 should be fine I think. 


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

okay will try it and see - thanks again.

Share this post


Link to post
Share on other sites

Back from vacation and checking my "open" threads ;) 
Could you solve the problem with 3.3.12.0?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Hi Water,

This is very kind of you thank you.

I have not tried yet, I am now on vacation too but will try later today, I downloaded the version but want to install it on a separate machine to make things easier, I can then just compile on that machine for testing. 

Will try asap and let you know.

Thank you again for your time it is apreciated.

Share this post


Link to post
Share on other sites

#10 ·  Posted

Hi Water,

I am sorry for my delayed reply.  I have installed  3.3.12.0  on another machine, and then compiled the script there.  I then run the .exe back on the machine where it needs to run and 'hey presto' the issue does not appear.  So compiling under 3.3.12.0 does fix the issue.  

Will compiling under 3.3.12.0 break code I have? e.g will things arise I am not aware of yet? or does this test support you in finding what is broken and as such you may be able to find a fix for the current  3.3.14.0 version?

Thank you again and look forward to your thoughts.

Share this post


Link to post
Share on other sites

#11 ·  Posted

2 hours ago, Lights_On said:

Will compiling under 3.3.12.0 break code I have? e.g will things arise I am not aware of yet?

Only if you use features in your code which have been added after 3.3.12.0. For details please check the history of AutoIt.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#12 ·  Posted

Hi Water,

Thank you for this - I have reviewed the the history here:

AutoIT Change Log History

and sadly I use the Word and Excel udf's a lot in my script so as such I expect I will encounter issues. 

Quote

Need to check why a Workbook has no name and handle this in the UDF. Will take some time as I'm on vacation right now. 

Do you think a fix, long term, is possible for the Excel UDF?  If so this would be ideal, but I appreciate possibly not always possible.

Thanks Water.

Share this post


Link to post
Share on other sites

#13 ·  Posted

But after version 3.3.12.0 there have been only minor changes/bug fixes.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#14 ·  Posted

It appears so but there are some code breakers that may effect my script.  I shall do some testing and see - the script is quite large so I may not see effects immediately.  I will read back though it for anything obvious in relation to history and changes to hopefuly see problems before they show them selves during use.

If you do find a fix for the UDF please do post it here, for now I shall use the older release and work round any issues I find.  

Thank you for you help as always - greatly appreciated.

Share this post


Link to post
Share on other sites

#15 ·  Posted

Maybe I can find a workaround. I will let you know.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#16 ·  Posted

Okay sounds great. Good luck and thank you.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now