Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
datalakeyu
Valued Contributor

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
datalakeyu
Valued Contributor

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

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

7 Replies
venkatg6759
Contributor III

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

datalakeyu
Valued Contributor

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

datalakeyu
Valued Contributor

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

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_dimperi
Valued Contributor II

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

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
Contributor II

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

Hi eduardo.dimperio

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

eduardo_dimperi
Valued Contributor II

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

Hi Jerry,

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

jerifortune
Contributor II

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

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.