Sign in to follow this  
Followers 0
atzoref

Problem with working with Excel

8 posts in this topic

#1 ·  Posted (edited)

Hi,

My script refuse to stop its proccess until I do it by myself with "Stop Executing"

I see this error in the log:

C:\Program Files (x86)\AutoIt3\Include\Excel.au3 (416) : ==> The requested action with this object has failed.:

If $fSave Then $oExcel.ActiveWorkBook.Save()

If $fSave Then $oExcel.ActiveWorkBook.Save()^ ERROR

Why I get this?

The functions of the excel which I work with are:

$oExcel = _ExcelBookOpen($)

_ExcelReadCell($oExcel, $, $)

_ExcelBookClose($oExcel)

Thanks.

Edited by atzoref

Share this post


Link to post
Share on other sites



Which version of Excel do you run? The 32 or the 64 bit version?

Which version of AutoIt do you run? Do you compile for 32 or 64 bit?


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

Excel 2007 = 64 bit

Autoit v3

SciTE Version 2.28

I don't know about the "compile" I just run it with "GO" on tools menu on SciTE

Share this post


Link to post
Share on other sites

The 64 bit version of Office seems to be unreliable and is not recommended by MS itself. There has been a discussion on this forum some time ago (sorry, don't have the time to search for it right now).

Everyone recommends the 32 bit version opf Office.

You have to make sure that the AutoIt script is compiled/run with the same bitness as Office.

Add "#AutoIt3Wrapper_UseX64=Y" at the top of your script to run/compile it for 64 bit and see what you get.


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

It seems that the problem was with the function:

_ExcelBookClose($oExcel)

So I just using now: WinClose("Excel")

and it is ok now.

Share this post


Link to post
Share on other sites

The discussion I was referring to can be found


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

When I press F5 on SciTE, how it compile the script? 32 or 64?

Share this post


Link to post
Share on other sites

As I mentioned in post #4 add the #AutoIt3Wrapper_UseX64 directive.


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

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
Sign in to follow this  
Followers 0