Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

automatic export of data from a QVW

i have a process that creates and daily reloads a QV model and publush it to the server.

i have another process, not using QV, but uses data calculated and stored in QV.

how can i create a batch file that will be scheduled to open the QVW and export the selected data?

the file type that will contain the exported data is of no importance. our ETL tools will handle everything....

1 Solution

Accepted Solutions
Not applicable
Author

1. write a macro that will export charts/table boxes to text file.  you can create the charts or table boxes on a hidden tab, if you do not want the qv document users to see these charts designed just for exporting.
2. configure the OnPostReLoad trigger (found in document properties - triggers) to fire the macro.
3.use a batch file to reload the qvw (using the command-line reload syntax).  use windows task scheduler to schedule the batch file to run on a schedule.
since Publisher will not fire any macro code within a qlikview document, you must use the batch file reload process in order for the macro to fire.
below is an example macro.  this will export data in the object CH01 to a pipe-delimited text file.

'--------------------------
' Export QC Chart Routine
'-------------------------

sub ExportChart 
 
output_dir="C:\export\"
Filename="DataFile.txt"
set obj = ActiveDocument.GetSheetObject("CH01")
obj.Export (output_dir & Filename) , "|"
end sub

View solution in original post

5 Replies
Not applicable
Author

1. write a macro that will export charts/table boxes to text file.  you can create the charts or table boxes on a hidden tab, if you do not want the qv document users to see these charts designed just for exporting.
2. configure the OnPostReLoad trigger (found in document properties - triggers) to fire the macro.
3.use a batch file to reload the qvw (using the command-line reload syntax).  use windows task scheduler to schedule the batch file to run on a schedule.
since Publisher will not fire any macro code within a qlikview document, you must use the batch file reload process in order for the macro to fire.
below is an example macro.  this will export data in the object CH01 to a pipe-delimited text file.

'--------------------------
' Export QC Chart Routine
'-------------------------

sub ExportChart 
 
output_dir="C:\export\"
Filename="DataFile.txt"
set obj = ActiveDocument.GetSheetObject("CH01")
obj.Export (output_dir & Filename) , "|"
end sub

Not applicable
Author

automatic export of data from a Qvf

That means i want same option in qliksense why because i need to export daily basis

Not applicable
Author

Hi Tammy gibson,

i need same thing in qliksense not in qlkview ,

how to implement in qliksense Show me with the help of Screenshots.

Now we are using qliksense 3.2 version.

Thanks,

Kumar.V.

Not applicable
Author

This was really helpful.

It worked!

Kidane Asrat

Hemanth458
Contributor III
Contributor III

Its working fine when i Press test button.

But, It'n working when the task gets reloaded is there any other changes required to execute it.