I built an automation script using the export file. Selected the query to be executed, file type of excel. When I was prompted to save the file location, I mapped it back to an excel macro that had two macros. I saw the prompt to decide to execute the macros before or after the load. I select both to run after the load. I saved the template and ran the automation script. When I tried to open the file I received this message
Excel can not open the file becuase the file or extension is not valid.
Any suggestions what is wrong or if I am donig anything wrong? Is there another method to execute macros?
First I would check the file name you are saving it to. Make sure the name ends with .xls or .xlsx or .xlsm (for a Macro file). There is another way to launch Excel also. You can use the run Program step to start Excel and put your Excel file on the argument line, this will launch Excel and open the spreadsheet specified. If you put an Auto_Open macro in that spreadsheet it will run run that macro (which can call your other two macros). You will need an Application.Quit statement at the end of the Auto_open macro so that it returns control to Toad or Toad will time out on that step. You would put the run program step after the select to file step.