Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Morning Everyone,
I need a little help. I need to automatically write out an excel file after I update my QVW. I have a straight table that needs written to a shared drive on our network. Does anyone have an example that they can share?
Thanks
If you add:
excelFile.DisplayAlerts = False
in the macro before the saveas line, it will overwrite without prompting
Check the solution on that link: Export to Excel and Add an Action OnPostReload calling the macro.
Thanks Dimitrios,
It worked great, only one small problem. My job has to run hourly and delete the old excel file before it writes out the new one. Any ideas on that one.
Thanks
For that case you can either call a cmd command at the start of your load script that will delete the previous file or if you have Publisher you can run this cmd command in a batch file that will be called by a preceding task to your reload.
I usually use the first way and the syntax of the EXECUTE command is like the following:
EXECUTE cmd.exe /C del “C:\MyFolder\MyExcel,xls”;
Remember that if you want to use this solution you have to:
If you add:
excelFile.DisplayAlerts = False
in the macro before the saveas line, it will overwrite without prompting