Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
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

Re: automatic export of data from a QVW

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

5 Replies
Not applicable

Re: automatic export of data from a QVW

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

Re: automatic export of data from a QVW

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

Re: automatic export of data from a QVW

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

Re: automatic export of data from a QVW

This was really helpful.

It worked!

Kidane Asrat

Hemanth458
New Contributor II

Re: automatic export of data from a QVW

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.