Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
andre_ficken
Partner - Creator
Partner - Creator

Move a view from app to csv

Hi All,

I am searching for a solution for the following:

I have a  pivot table composed from a diversity of columns and tables. This table gets validated by an admin user and that user can export that pivot table to a csv file. It is required to generate the file name of the csv (datetime generated and from/to selection date are included in the filename) and select a subset of columns from the pivot table (not all columns will have to be stored into the csv). 

Any suggestions and illustrations on how to proceed are welcome!

Thanks in advance.

Labels (1)
1 Reply
marcus_sommer

You could try it with a macro maybe with something like this:

DateTime = ActiveDocument.Evaluate("=timestamp(now(), 'Format')")
Selection = ActiveDocument.Evaluate("=getcurrentselections()")
FilePath = "C:\Path\" & DateTime & Selection & ".csv"

set obj = ActiveDocument.GetSheetObject("CH01")
obj.ExportEx FilePath, 1

Important will be to define the right formattings for the timestamp and the selections because chars like :/\ aren't allowed within a path and by including any spaces the variable needs to contain the double-quotes in itself. I think a msgbox will be useful to check if the variable-stuff returns the needed result.

- Marcus