Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Write out Excel File

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

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

If you add:

excelFile.DisplayAlerts = False

in the macro before the saveas line, it will overwrite without prompting

View solution in original post

4 Replies
dapostolopoylos
Creator III
Creator III

Check the solution on that link: Export to Excel and Add an Action OnPostReload calling the macro.

Father/Husband/BI Developer
tmumaw
Specialist II
Specialist II
Author

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

dapostolopoylos
Creator III
Creator III

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:


Capture.JPG

Father/Husband/BI Developer
m_woolf
Master II
Master II

If you add:

excelFile.DisplayAlerts = False

in the macro before the saveas line, it will overwrite without prompting