KalleB Posted January 2, 2011 Share Posted January 2, 2011 (edited) I have been searching the forum, both internally and with google, and all I come up with is which doesn't help me at all. As far as I can tell (Excel -> File -> Help) I have a 32-bit version of Excel and (Win + Pause|Break) 64-bit Win 7 Home Premium. Running the AU3 file, running a compiled version or running a compiled (X86) version all give the same result: 0 1 When running #include <Excel.au3> $oExcel = _ExcelBookNew() MsgBox(1, "", $oExcel & @CRLF & @error) either from Desktop (c:\user\<username>\desktop) or from d:\temp I recall having this problem before, being able to use the _Excel UDF functions at work, with Win XP and Excel 2007, but the same scripts failing at home. Unfortunately I can't test at work during the weekend (and I'd like to know a solution before Monday...). So... I gather there is a problem with Excel 2010. But is there any solution? Either a ready solution, or a solution that some helpful person is working on? And yes, that is with 3.3.6.1 Edited January 2, 2011 by KalleB Link to comment Share on other sites More sharing options...
wwardw Posted January 7, 2011 Share Posted January 7, 2011 I have the same problem since upgrading to Office 2010 last night. @error responds with 1 when trying to open or create an xls or xlsx file, and Excel does not start. Link to comment Share on other sites More sharing options...
Juvigy Posted January 10, 2011 Share Posted January 10, 2011 Try this code and tell me if it works; $oExcel = ObjCreate("Excel.Application") $oExcel.Visible = 1 $oExcel.Workbooks.Add Link to comment Share on other sites More sharing options...
KalleB Posted January 15, 2011 Author Share Posted January 15, 2011 Try this code and tell me if it works; $oExcel = ObjCreate("Excel.Application") $oExcel.Visible = 1 $oExcel.Workbooks.Add No, it points to the ".Visible" and says "Variable must be of type 'Object'." Same result whether Excel is open or not. $oExcel is 0 and @ERROR is -2147221005 Link to comment Share on other sites More sharing options...
pedmacedo Posted January 15, 2011 Share Posted January 15, 2011 Well man I have excel 2010 here and this line worked for me(it just opens an excel file) $excel_file = _ExcelBookOpen("C:\Users\Macedo\Desktop\nei3.xlsx") Switch ""C:\Users\Macedo\Desktop\nei3.xlsx" To the path of a file you wanna open Link to comment Share on other sites More sharing options...
KalleB Posted January 15, 2011 Author Share Posted January 15, 2011 Well man I have excel 2010 here and this line worked for me(it just opens an excel file) $excel_file = _ExcelBookOpen("C:\Users\Macedo\Desktop\nei3.xlsx") Switch ""C:\Users\Macedo\Desktop\nei3.xlsx" To the path of a file you wanna open Doesn't work, neither with .xls nor .xlsx, neither with Excel opened nor closed, and neither with the filename as a string in the _ExcelBookOpen nor first assigning it to a variable. Link to comment Share on other sites More sharing options...
water Posted January 15, 2011 Share Posted January 15, 2011 I was having similar troubles when running 64 bit Windows 7 with the 32 bit version of Office. I had to compile the script as 32 bit and everything went find. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Juvigy Posted January 17, 2011 Share Posted January 17, 2011 (edited) Did you try reinstalling office ? #requireadmin ? Edited January 17, 2011 by Juvigy Link to comment Share on other sites More sharing options...
KalleB Posted January 26, 2011 Author Share Posted January 26, 2011 Did you try reinstalling office ?#requireadmin ?No I haven't tried reinstalling Office, and I won't do it, since the code works in the environment where it will be used (older Excel), just would be neat to be able to write code at home when I'm sleepless. #requireadmin did nothing but ask for permission, no change in outcome.I think I might give up getting this to work, atleast until I find that a reinstall of Office will be done. Thanks to all who tried! Link to comment Share on other sites More sharing options...
Zedna Posted August 14, 2011 Share Posted August 14, 2011 I was having similar troubles when running 64 bit Windows 7 with the 32 bit version of Office. I had to compile the script as 32 bit and everything went find.For this can be used Autoit3Wrapper macro in full Scite4Autoit3Just add this line at top of your script and compile it from full Scite4Autoit3 (by F7)#AutoIt3Wrapper_UseX64=n Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now