Jump to content

_Excel_BookOpenEX Error then crash


Recommended Posts

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?

Link to comment
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 2022-02-19 - Version 1.6.1.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 (NEW 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

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.

 

 

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.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 (NEW 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

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.

Link to comment
Share on other sites

3.3.12.0 should be fine I think. 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

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 2022-02-19 - Version 1.6.1.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 (NEW 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

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.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 (NEW 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

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.

Link to comment
Share on other sites

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

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.

Link to comment
Share on other sites

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...