Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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.


2 Replies
Not applicable

Re: Formatting excel spreadsheets via QV macro and Scheduled task

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

Re: Formatting excel spreadsheets via QV macro and Scheduled task

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,