bootybay Posted September 17, 2013 Share Posted September 17, 2013 I just wanted to try exmaple 1 but there is no .xls file created. Even if i use "C:TestTemp.xls" instead of that @TempDir path it doesn't save anything. #include <Excel.au3> Local $oExcel = _ExcelBookNew() ;Create new book, make it visible _ExcelWriteCell($oExcel, "I Wrote to This Cell", 1, 1) ;Write to the Cell MsgBox(0, "Exiting", "Press OK to Save File and Exit") _ExcelBookSaveAs($oExcel, @TempDir & "\Temp.xls", "xls", 1, 1) ; Now we save it into the temp directory; overwrite existing file if necessary _ExcelBookClose($oExcel) ; And finally we close out I'm missing something but I can't see what. Link to comment Share on other sites More sharing options...
water Posted September 17, 2013 Share Posted September 17, 2013 Don't know what is wrong but you need to add some error checking to your script. Every function sets the returnvalue or macro @error in an case of an error. The help file explains what to check. 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...
bootybay Posted September 17, 2013 Author Share Posted September 17, 2013 I was hoping that the example would work. I was looking at this: http://www.autoitscript.com/autoit3/docs/libfunctions/_ExcelWriteCell.htm Link to comment Share on other sites More sharing options...
water Posted September 17, 2013 Share Posted September 17, 2013 You need to povide more information: Which version of Excel do you run? Which version of AutoIt do you run? 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...
water Posted September 17, 2013 Share Posted September 17, 2013 The example you provided in post #1 runs fine here and creates the Excel file. What is the value of @TempDir? 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...
bootybay Posted September 17, 2013 Author Share Posted September 17, 2013 You need to povide more information: Which version of Excel do you run? Which version of AutoIt do you run? You already solved the mystery. I didn't know I needed Excel since I work with google docs. I thought it would just create a spreadsheet and I would just import it. Thank you for helping me out. May I use OpenOffice or do I need Microsoft Excel for this? PS: @TempDir isn't the problem its value is the standard C:Users***AppDataLocalTemp and I tried fixed paths aswell already. Link to comment Share on other sites More sharing options...
water Posted September 17, 2013 Share Posted September 17, 2013 To run the Excel UDF you need MS Excel installed. There is an OpenOffice Calc UDF available on the forum. But I'm not familiar with it. There are UDFs available on the forum to read/create Excel files without having Excel installed. I might provide further information if I know which route you want to take. 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...
bootybay Posted September 17, 2013 Author Share Posted September 17, 2013 I'm interested in the nonExel UDFs. I'm confident that I would be able to work with the Excel.au3 if I wanted to install Office. Link to comment Share on other sites More sharing options...
Solution water Posted September 17, 2013 Solution Share Posted September 17, 2013 Reading XLSX files: >www.autoitscript.com/forum/topic/145160-xlsxreadtoarray-using-only-autoit Create XLSX files: '?do=embed' frameborder='0' data-embedContent>> You could use ADO. This means an Excel workbook is treated like a database: 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...
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