Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

datashaw
New Contributor III

Export QlikView Straight table data into .csv format on automated process

Hello Experts,

I'm looking to export a QlikView  object  data into .csv file into C:\Users\' on daily automated process .

appreciate your suggestions.

thanks,

Labels (2)
6 Replies
andrey_krylov
Valued Contributor

Re: Export QlikView Straight table data into .csv format on automated process


In the Load script at the end of the tables write


STORE TableName into TableName.csv(txt);

puttemans
Valued Contributor

Re: Export QlikView Straight table data into .csv format on automated process

Hi Praveen,

As Andrey mentions, best is to (re-)create the object as a table in your script, and then save this table into a csv on the desired place. Every time you reload the application/the script (which you can define on the QV-server), the file in the destination folder will be renewed.

datashaw
New Contributor III

Re: Export QlikView Straight table data into .csv format on automated process

Hi Johan,

Thank you for the reply. Can you please send an example to 'Recreate the QlikView Straight table object in script' (My strait table contains 1 Dimension and two Calculated set analysis expressions  )

So i can store as .csv file.

appreciate your help.

datashaw
New Contributor III

Re: Export QlikView Straight table data into .csv format on automated process

Hi Andrey,

I am not sure ..Is this something like this..?

Store "CH66" into $(vQVDFilesFolderPath)FTPData.csv (txt);

PS: CH66 is my straight table Object ID and it contain two calculated expressions.

Highlighted
balabhaskarqlik
Honored Contributor

Re: Export QlikView Straight table data into .csv format on automated process

balabhaskarqlik
Honored Contributor

Re: Export QlikView Straight table data into .csv format on automated process

May be this:

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.

  1. '-------------------------- 
  2. ' Export QC Chart Routine 
  3. '------------------------- 
  4. sub ExportChart   
  5. output_dir="C:\export\" 
  6. Filename="DataFile.txt" 
  7. set obj = ActiveDocument.GetSheetObject("CH01") 
  8. obj.Export (output_dir & Filename) , "|" 
  9. end sub 

automatic export of data from a QVW