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: 
Not applicable

How do I get selection values into an Excel Export filename?

Hi, I have a button with an Export Action that exports data to CSV.

My main selection criteria is [Reporting Date] and I'd like the Export Action to name the file something like: myExport_20141119.csv where 20141119 is the current [Reporting Date] (I would need to format it to yyyyMMdd also).

How do I get a value from the current selection criteria into the file name of the export action settings?

ExportAction_320.png

The QlikView help says "If you export to a file you must mark this check box and enter the file name. If no file name is entered, the values will be exported to the clipboard. The file name may be entered as a Calculated Formula."

Trouble is, I'm a newbie and after searching this forum for over an hour, I can't find an example of this anywhere.

1 Solution

Accepted Solutions
morgankejerhag
Partner - Creator III
Partner - Creator III

Hello,
I haven't tried this myself, but I guess you could do something like

='myExport_' & date(ReportDate,'YYYYMMDD' & '.csv'

Are you sure that only a single ReportDate can be chosen when exporting? If it could be several ReportDates selected you will run into technical and logical problem with the above. To solve the technical part you can write:

='myExport_' & date(max(ReportDate),'YYYYMMDD' & '.csv'


But the logical problem persists - there are multiple reports merged and exported.

View solution in original post

2 Replies
morgankejerhag
Partner - Creator III
Partner - Creator III

Hello,
I haven't tried this myself, but I guess you could do something like

='myExport_' & date(ReportDate,'YYYYMMDD' & '.csv'

Are you sure that only a single ReportDate can be chosen when exporting? If it could be several ReportDates selected you will run into technical and logical problem with the above. To solve the technical part you can write:

='myExport_' & date(max(ReportDate),'YYYYMMDD' & '.csv'


But the logical problem persists - there are multiple reports merged and exported.

Not applicable
Author

You sir, are a ninja

thank you, works like a charm.