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

How to do a daily batch job to create excel sheet from a table in the qvw file and save it on the disk of the server?

Basically, I need to create a batch job that exports a table in the .qvw file to an excel and saves it on the server disk (better if I can save it on the disk on a different server in the network)

Suppose I have a table such as below:



table1:

Load

* Inline



[OrderNumber, ProjectNum, OrdDate, PlanDelDate, SalesID, DelDate



123456, 123456, 1/27/2010, 2/10/2010, 55111, 2/8/2010

234567, 234567, 1/27/2010, 2/10/2010, 55112, 2/8/2010



345678, 345678, 1/27/2010, 2/10/2010, 55113, 2/8/2010

];

Now, of course I can go in the application and click the excel icon to create an excel sheet of this table and save it on the disk. How do I create a simple batch job to this daily.

Any response is appriciated. Thanks in advance.

-Samir







1 Solution

Accepted Solutions
pover
Luminary Alumni
Luminary Alumni

The onpostreload trigger doesn't seem to work when you reload from the server, so look in the forum for help to create a VBS script file that will basically open the QlikView document and click a button to run your macro. Then run the VBS script file with Windows Job Scheduler.

Regards.

View solution in original post

4 Replies
Not applicable
Author

OK after hours of searching forum and sucn, I have this macro that does the trick:

function test

folderToSave = "c:\ExcelExport"

fileNamePath = folderToSave & "Traffic" & ".xls"

'Exporting
set obj = ActiveDocument.GetSheetObject("TB01")
obj.ExportBiff fileNamePath

end function



I have this macro running on onPostReload, so that this report gets updated daily.This works fine on my local machine, however, it does not on the server. I check the macro access and is set to system access as well. I gave IQVS_CLIKVIEW user full access to the folder as well. I'm running windows server 2007 64 bit for our qlikview server. Any response is appriciated. Thanks.

-Samir





pover
Luminary Alumni
Luminary Alumni

The onpostreload trigger doesn't seem to work when you reload from the server, so look in the forum for help to create a VBS script file that will basically open the QlikView document and click a button to run your macro. Then run the VBS script file with Windows Job Scheduler.

Regards.

Not applicable
Author

Hi Karl,

Thanks so much for the response. That worked!

Not applicable
Author

Hi Guys,

I have create a job that open qlikview model and run macro ( export to excel)...it works with my user...

On Servr this Job doesn't work throught scheduler task, because I have this error ...."your installation of qlikview has exceeded the maximum number of document recoveries allowed for a personal edition license...please help me?

Error.jpg