b1nd3r512 Posted June 26, 2013 Share Posted June 26, 2013 Hi Guys Sorry im new to autoit and coding in general i have a basic understanding. Heres what im trying to do and i hope someone can help. I need to open a excel document that retrieves data from sql and then saves the excel files with todays date. Basically we are pulling reports daily to see who does what in our warehouse. The problem is the data refresh once the excel document is open takes about 5 minutes to generate. Here is my starting code of just opening the document. " run('"C:Program Files (x86)Microsoft OfficeOffice14EXCEL.EXE" "C:Test"') " the sheet will pull the data automatically but how do i get the script to save the file AFTER the data has been recieved and with todays date. Regards Red Link to comment Share on other sites More sharing options...
water Posted June 26, 2013 Share Posted June 26, 2013 Welcome to AutoIt and the forum! You could use the Excel UDF that comes with AutoIt to open and save the Workbook. I haven't tested it but I think the _ExcelBookOpen function will return after the data has been loaded. Then you can save the updated Workbook. 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...
b1nd3r512 Posted June 26, 2013 Author Share Posted June 26, 2013 Sounds good thanks man ill give it a try the problem is im trying to automate this whole process. So 5pm script runs, It opens file generates results and after 5-10min it saves as the current date and closes excel :/ Link to comment Share on other sites More sharing options...
water Posted June 26, 2013 Share Posted June 26, 2013 Which file format do you want to work with: xls or xlsx? 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