Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Formatting excel spreadsheets via QV macro and Scheduled task

Is there a way to format an excel sheet via a QV macro that is run via a scheduled task?

A bit of background.

With the help of this extremely helpful blog (link below) I've created a macro that takes several QV objects and places them into different sheets in an Excel spreadsheet, then applies some formatting and emails the spreadsheet to some recipients.

I want to use a windows scheduled task to automate the process, I get the task to call a batch file. 

The scheduled task will run fine when the user is logged in, but not when no one is logged in.  I think this is to do with the macro using the "GUI" while formatting the spreadsheet.  All of the scheduled task settings about running when the user is not logged on are set correctly, I have other AV apps generating XL dumps and PDF's on schedule.

http://www.qlikblog.at/971/ 

2 Replies
Not applicable
Author

Hi Rob, I am not familiar with Macro's writing. But I will give idea how to execute the batch file.

1. Create QVW with Macro to create excel file with multiple qv objects.

2. Setup a Task ok QEMC for reload and call the Macro trigger after post Reload.

3. Create the batch file to format the excel file or email subjects

4. Call the batch file trough external programs on QEMC after successful reload of QV Task.

Not applicable
Author

Thanks Darth,


Unfortunately the client is running QV SBE server with no publisher, Windows scheduled tasks are all I've got to work with.


I found a solution to the problem was to run excel "silently", ie not open the GUI,

Create this directory:

c:\windows\syswow64\config\systemprofile\desktop   ( This may not be necessary but it was one of the trhee changes I made)


Then set the windows scheduled task to run with the highest privileges.


For me it basically boiled down to a Windows / Excel problem, QV was behaving as expected.  There was a bit more detail in this thread,

http://social.msdn.microsoft.com/Forums/office/en-US/ac2549f5-fc1e-494d-9015-70cb31d3aeb2/opening-ex...