Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
eric_careta
Partner - Contributor III
Partner - Contributor III

Export data in a qlik sense mashup on external server

Hi,

I have a mashup running on external server of qliksesne server, When I try to export Data with this code:

  1. app.getObject('objectid').then(function(model) { 
  2. var table = qlik.table(model); 
  3. table.exportData({download: true}); 
  4. }) 

When this call is completed from within qliksense Mashup hub, this works because the download is sent to the

tempcontent/{asbasdfasdf} folder of the root domain.

if your qliksense domain is

qlikabc.com/hub

your mashup can be

qlikabc.com/mashup/test

the export file will always be

qlikabc.com/tempcontent/{asdsadfsadf}

But we don't use qliksense mashup HUB.

our site would be

mysite.com/

we use an external IIS to host our mashup.  So calling table.exportData does not work because the URL is incorrect.

It tries to download the url at

mysite.com/tempcontent/{abcasdfasdf}

which doesn't exist.

I thought that the exportData returns a promise so i added the then, unfortunately nothing is returned so I am not able to correct the location of the file, which I realized is stored on the qliksense server.  Is there a flag or anything that is available to figure out what is the export tempcontent info so that I can use it to get the link to downloadable file.

Can anybody solve that?

Thanks,

1 Reply
gabineaq
Partner - Contributor III
Partner - Contributor III

Hi,

I've had the same problem, except that my server was running on NodeJS.

I've solved the problem by appending the url to the QlikSense Server url.

My exportData function looks like this:

var export_url="https://YOUR_QLIKSENSE_SERVER/VIRTUAL_PROXY";

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

     window.open(export_url + reply.qUrl);

});