Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Export data from Qlik sense Single configurator or Qlik sense mashup page?

I am using Qlik sense desktop 3.0. When I export data in Qlik sense desktop,I can right click on the Qlik sense object and export data.

I create a Qlik Single configurator and Qlik mashup page now.

How to Export data from Qlik sense Single configurator or Qlik sense mashup page?

Thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Use Stefan Walther's method, and it works.

add div in html file

<button id="cmdExport" style="display:none;"> 

   Export data 

</button> 

<div id="QV01" style="position: absolute; top: 50px; left: 20px; width: 200px; height: 200px;" class="qvobject"></div> 

add callback function in .js file

require( ["js/qlik", "jquery"], function ( qlik, $ ) { 

   qlik.setOnError( function ( error ) { 

      alert( error.message ); 

   } ); 

 

  var app = qlik.openApp('Executive Dashboard.qvf', config); 

 

  app.getObject('QV01','NaKQwM').then( function( vizModel ) { 

 

      // Prevent clicking on the button too early 

      $('#cmdExport').show(); 

 

 

      $('#cmdExport').on('click', function() { 

 

         vizModel.exportData().then(function( reply ) { 

            console.log('qUrl', reply); 

            window.open(reply.result.qUrl); 

         }); 

      }) 

   }); 

} ); 

The link:

How to include "Export data" feature in a mashup

View solution in original post

7 Replies
venkatg6759
Creator III
Creator III

Anonymous
Not applicable
Author

Use Stefan Walther's method, and it works.

add div in html file

<button id="cmdExport" style="display:none;"> 

   Export data 

</button> 

<div id="QV01" style="position: absolute; top: 50px; left: 20px; width: 200px; height: 200px;" class="qvobject"></div> 

add callback function in .js file

require( ["js/qlik", "jquery"], function ( qlik, $ ) { 

   qlik.setOnError( function ( error ) { 

      alert( error.message ); 

   } ); 

 

  var app = qlik.openApp('Executive Dashboard.qvf', config); 

 

  app.getObject('QV01','NaKQwM').then( function( vizModel ) { 

 

      // Prevent clicking on the button too early 

      $('#cmdExport').show(); 

 

 

      $('#cmdExport').on('click', function() { 

 

         vizModel.exportData().then(function( reply ) { 

            console.log('qUrl', reply); 

            window.open(reply.result.qUrl); 

         }); 

      }) 

   }); 

} ); 

The link:

How to include "Export data" feature in a mashup

eduardo_dimperio
Specialist II
Specialist II

Hey Haikuo, Stefan Walther's method works for sure, but always save on client Download's folder, that's anyway to choose the folder to save?

jerifortune
Creator III
Creator III

Hi eduardo.dimperio

Is it possible to specify the directory where the file will be saved?

eduardo_dimperio
Specialist II
Specialist II

Hi Jerry,

i didn't found a way, i believe that not possible

jerifortune
Creator III
Creator III

Thank you Edurado.

I thought the same. What I concluded doing is changing the default download location to reflect the path I want to store the file. This is achieved at the client browser.