Sign in to follow this  
Followers 0
Mucho

Compiling Error

4 posts in this topic

Been using the program for some years and today tried to compile after some changes to program but got the following error.

 

 

error: _ExcelBookOpen(): undefined function.
    $oExcel = _ExcelBookOpen ("C:UsersThomasAppDataRoamingMicrosoftExcelXLSTARTPERSONAL.XLS")

 

So I installed the latest version of Autoit today but still got the same error. I'm stumped. Pls help.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

_Excel_BookOpen("Excel obj here", "C:\Users\Thomas\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLS")

EDIT: "All function names have been changed from _Excel* to _Excel_*."

EDIT: An example:

$eOpn = _Excel_Open()
_Excel_BookOpen($eOpn, "C:\Users\Thomas\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLS")
Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Universalist,

Thank you!:thumbsup:

Edited by Mucho

Share this post


Link to post
Share on other sites

anytime ;)


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

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

  • Similar Content

    • Skysnake
      By Skysnake
      Hi
      I need help.
      I have re-installed AutoIt, but the problem persists.
      My script uses an #include <tourney_mymain.a3x> which Scite fails to read.  To be clear, as long as it is in .au3 format, it works.  The moment I build it as .a3x, it fails.
      ;#include <tourney_mymain.a3x> #include <tourney_mymain.au3> _MyMainFunc() The file tourney_mymain.au3 exists in the same folder, and the header looks like this
      #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_type=a3x #AutoIt3Wrapper_Outfile=C:\AutoIt\tourney\tourney_mymain.a3x #AutoIt3Wrapper_Run_AU3Check=n #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** The error looks like this:
      >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\AutoIt\tourney\tourney.au3" /UserParams +>16:13:57 Starting AutoIt3Wrapper v.16.306.1237.0 SciTE v.3.6.2.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 # detect ascii high characters and if none found set default encoding to UTF8 and do not add BOM +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\user\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\user\AppData\Local\AutoIt v3\SciTE >Running Tidy (16.306.1237.0) from:C:\Program Files (x86)\AutoIt3\SciTE\tidy +>16:13:57 Tidy ended.rc:0 >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:C:\AutoIt\tourney\tourney.au3 "C:\AutoIt\tourney\tourney.au3"(55,13) : error: _MyMainFunc(): undefined function. _MyMainFunc() ~~~~~~~~~~~~^ C:\AutoIt\tourney\tourney.au3 - 1 error(s), 0 warning(s) !>16:13:57 AU3Check ended. Press F4 to jump to next error.rc:2 +>16:13:57 AutoIt3Wrapper Finished. >Exit code: 2 Time: 1.028 When I toggle back to the .au3 file and compile/run, it works.
      >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\AutoIt\tourney\tourney.au3" /UserParams +>16:28:05 Starting AutoIt3Wrapper v.16.306.1237.0 SciTE v.3.6.2.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 # detect ascii high characters and if none found set default encoding to UTF8 and do not add BOM +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\user\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\user\AppData\Local\AutoIt v3\SciTE >Running Tidy (16.306.1237.0) from:C:\Program Files (x86)\AutoIt3\SciTE\tidy +>16:28:06 Tidy ended.rc:0 >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:C:\AutoIt\tourney\tourney.au3 +>16:28:06 AU3Check ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\AutoIt\tourney\tourney.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop I was here! +>16:28:06 AutoIt3.exe ended.rc:0 +>16:28:06 AutoIt3Wrapper Finished. >Exit code: 0 Time: 1.066 Building the .a3x file, returns this:
      >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "C:\AutoIt\tourney\tourney_mymain.au3" +>16:29:01 Starting AutoIt3Wrapper v.16.306.1237.0 SciTE v.3.6.2.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 # detect ascii high characters and if none found set default encoding to UTF8 and do not add BOM +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\user\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\user\AppData\Local\AutoIt v3\SciTE >Running Tidy (16.306.1237.0) from:C:\Program Files (x86)\AutoIt3\SciTE\tidy +>16:29:01 Tidy ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe /in "C:\AutoIt\tourney\tourney_mymain.au3" /out "C:\Users\user\AppData\Local\AutoIt v3\Aut2exe\~AUDA33.tmp.a3x" /nopack /comp 2 +>16:29:02 Aut2exe.exe ended.C:\Users\user\AppData\Local\AutoIt v3\Aut2exe\~AUDA33.tmp.a3x. rc:0 +>16:29:02 Created program:C:\AutoIt\tourney\tourney_mymain.a3x +>16:29:02 AutoIt3Wrapper Finished. >Exit code: 0 Time: 1.718 And the header of the  contents of the .a3x file looks like this:
      £HK¾˜lJ©™LS †ÖH}AU3!EA06M¨ÿs$§<öz�ñg¬Á“çkCÊR¦­ á»:!¥)ãìç�˜.@½ášÞ€F±�k;!Ô±Öu:È=ÆÐ3÷�¯Ë�¢”���ˆþd•aç¶M�ø ,p~©=�ã™Õˆ ¬C�9˜�8öþ8_Yr©0h�d It looks like this in pure AutoIt:
      Func _MainFunc() ConsoleWrite("I was here!" & @CRLF) Local $sMainstatus = 'The database is empty' $Main = GUICreate("Roster", 640, 480) ; --- Top level menu Global $idHelpmenu = GUICtrlCreateMenu(" Help ") I have a similar AutoIT installation running on Windows 7, no problem.  The machine giving problems is Win 10.
      Any ideas would be appreciated.  This is a new pet project of mine and this is just the start, so I am willing to zip ALL of it and send it along if anyone wants to see inside.
      Thanks.
      Skysnake
    • broliukaz
      By broliukaz
      Hi,
      Before I created my script with Windows 7 pro 32bit computer with Office 2013 32bit, and it's working on all my computers with Win7, Win8, Win10 with office 32 and 64bit...
      Now I want to edit it on Windows 10 pro 64bit Computer with Office 2016 64bit and I get error: _ExcelReadCell() - undefined function. Can this computer or office version cause the problem? Excel.au3 is included.
      Here is the part of my script:
      Local $oExcel = _Excel_Open() Local $oWorkbook = _Excel_BookOpen($oExcel, $xlsRepairs&$sItem) $CVDevice = _ExcelReadCell($oExcel, 1, 2) ; Device name $CVeqrma = _ExcelReadCell($oExcel, 3, 3) ; EQRMA Number $CVlot = _ExcelReadCell($oExcel, 5, 3) ; Lot number $CVpn = _ExcelReadCell($oExcel, 8, 3) ; PN $CVsn = _ExcelReadCell($oExcel, 11, 3) ; SN $CVreceived = _ExcelReadCell($oExcel, 17, 3) ; received $CVDevIdent = _ExcelReadCell($oExcel, 1, 2) ; Device identification $CVProjIdent = ($oExcel, 2, 2) ; Project identification _Excel_Close($oExcel)