Jump to content
Sign in to follow this  
DickWms

_ExcelBookOpen fails under Windows 8

Recommended Posts

DickWms

I have some AutoIt scripts that run fine under Windows XP but do not run under Windows 8. The problem appears to be the _ExcelBookOpen statement fails. I've used the following example script from the Help file for a test.

; ***************************************************************
; Example 1 - Open an existing workbook and returns its object identifier.
; *****************************************************************

#include

Local $sFilePath1 = @ScriptDir & "\Test.xls" ;This file should already exist
Local $oExcel = _ExcelBookOpen($sFilePath1)

If @error = 1 Then
MsgBox(0, "Error!", "Unable to Create the Excel Object")
Exit
ElseIf @error = 2 Then
MsgBox(0, "Error!", "File does not exist - Shame on you!")
Exit
EndIf

Running this produces the Error message box Unable to Create the Excel Object.

I'm using Microsoft Excel 2002.

I need some help to correct or work around this problem.

Thank you - Dick

Share this post


Link to post
Share on other sites
water

You are running Excel 2002 on Windows 8?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - 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
water

According to MS only Office 2007, 2010 and 2013 are supported on Windows 8.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - 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  

  • Similar Content

    • AutID
      By AutID
      Hello,

      I will put it as simple as possible
      Why this code runs perfectly on 32bit and it fails on 64bit?
      Local $hWND = WinGetProcess("[CLASS:LSS_app]") ConsoleWrite($hWND & @LF) Local $hModuleList = _WinAPI_EnumProcessModules($hWND) If @error Then ConsoleWrite("Error: " & @error & @LF) For $i = 0 To $hModuleList[0][0] - 1 ;~ If StringInStr($hModuleList[$i][1], "sysCap64.dll") Then ConsoleWrite($hModuleList[$i][0] & @LF) ;~ EndIf Next As the title says EnumProcessModules returns error 10 which I have no clue what it is.
      It must be something with autoit or my lack of coding because a similar code in C# will work like a charm on both x86 and x64
      Process[] Processes = Process.GetProcessesByName("winLSS64Cap"); Process nProcess = Processes[0]; Handle = OpenProcess(0x10, true, (uint)nProcess.Id); for(int i = 0; i < nProcess.Modules.Count; i++) { Console.WriteLine(nProcess.Modules[i].ModuleName); }  
    • Rickname
      By Rickname
      I want to switch from Windows 7 to Windows 8.1 ( x86 ) but I still want to code in AutoIt. Now I saw in the Description file that is only compatible upto Windows 7, but will it work also on 8 ? And yes Im referring to the latest Autoit version available !
    • badapple89
      By badapple89
      I basically want to create a Windows 8 Training script for new users, so need a popup to show when they open the start menu.
        WinWait and WinWaitActive are never detecting on my Win8 64 bit computer when waiting for the new start screen window.
      I have used "Start menu" and "[CLASS:ImmersiveLauncher]" for the title, even "[CLASS:DirectUIHWND]"
      Below is the Window info the the Start Screen
      >>>> Window <<<< Title: Start menu Class: ImmersiveLauncher Position: 1920, 0 Size: 1920, 1080 Style: 0x96000000 ExStyle: 0x00200008 Handle: 0x0000000000010190 >>>> Control <<<< Class: DirectUIHWND Instance: 0 ClassnameNN: DirectUIHWND0 Name: Advanced (Class): [CLASS:DirectUIHWND; INSTANCE:0] ID: Text: Position: 0, 0 Size: 1920, 1080 ControlClick Coords: 138, 174 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x0000000000010192 >>>> Mouse <<<< Position: 2058, 174 Cursor ID: 0 Color: 0x180053 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< Explorer Browser Control   I have this setup to run as a test when I press a hotkey:
      $title = WinGetTitle ("[ACTIVE]")
      $state = WinGetState  ($title)
      ConsoleWrite ($title &" "& $state)
      I get "Start menu 0" its always 0 no matter what (it works correctly with other programs)
      I can get the PID of start menu but how can I then check when its active from that?
      Any help appreciated
      EDIT: I can only get the PID, Handle or anything else if the Start window is open. I cannot use win wait with any of this info though.
    • uncommon
      By uncommon
      I need to to create and switch to a windows profile without user interaction which I got to work for the most part.
      I took care of creating a new account and I found a small trick online to switch a windows profile without user interaction(this needs to be done to create some registry which are changed later in the script).
      "Trick" artical found here.
      Basically, Kill the all exlorer.exe's then run a new explore.exe as the new user account I just made. This makes windows start setting up the profile and directories and it loads into the new enviorment. Works like a charm.
      But Windows 8 seems to get stuck doing this trick. I think explorer is not making the $WM_SETTINGCHANGE call to the einviorment it use to to change the settings.
      Trying this in windows 8 DOES cause windows to setup the new profile. You can see the "personalized settings" loading screen popup. But later I am left at a black screen with a taskbar and not much to work with. I tried starting exploer again with the task manager and it made the process but I was still at a black screen.
      I did some reasaerch was thinking doing a Dillcall to explorer with _WinAPI_SystemParametersInfo(, , , $SPIF_SENDCHANGE), but to be honest I have never done this b4 and its mostly shooting in the dark
      Any advice?
      I have made a small repoduction of the problem. Remeber the problem is on windows 8.
      #include <WinAPI.au3> ;create newuser account^ ;Login to new user account $Username = "johnsmith" $Password = "123pass" $Processarray = ProcessList() For $x = 1 To UBound($Processarray) - 1;search and distroy explorer.exe     If StringInStr($Processarray[$x][0], "explorer.exe") > 0 Then         $pid = $Processarray[$x][1]         $handle = _WinAPI_OpenProcess(0x1, 0, $pid)         DllCall("kernel32.dll", "int", "TerminateProcess", "int", $handle, "int", 1)     EndIf Next RunAs($Username, @ComputerName, $Password, 1, "explorer.exe")
×