Qlik Community

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to include "Export data" feature in a mashup

Hi everyone. I am new to creating mash ups and was wondering if I could get a solution to a issue I have come across.

I created a mashup using Qlik Sense Server Workbench. This mashup contains a table object from one of the sheets in my app. When accessing the sheet via the HUB, right clicking on the table shows an Export Data option for this table object. Is there a way for me to include this feature for this table in my mashup?

Thanks!

27 Replies
brijeshvma
Partner
Partner

Hi Stefan ,

Thanks for your sample code . I am using this my qap Project but

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.

datalakeyu
Specialist
Specialist

Hi Brijesh and Stefan,

I meet the similar issue.

I am trying to figure out a solution/walk-around now.

Could you please share your update or suggestion? If I get a clue, I will also post here.

Thanks!

kathir
Partner
Partner

Hi,

Anybody got solution/workaround for this? facing same issue.

Thanks

Not applicable
Author

What we do to avoid the blocked popup is target _self on the window.open

prefix is a global:

var prefix = window.location.pathname.substr(0, window.location.pathname.toLowerCase().lastIndexOf("/single") + 1);

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

    qlik.currApp().getAppLayout().then(function(applayout) {

        var appName = (applayout.layout && applayout.layout.qTitle) || applayout.qTitle;

        var appId = (applayout.layout && applayout.layout.qFileName) || applayout.qFileName;

        var app = qlik.openApp(appId, config);

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

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

                window.open(prefix.substring(0, prefix.length - 1) + reply.result.qUrl, "_self");

            });

        });

    });

});

datalakeyu
Specialist
Specialist

Hi Ralph, Is your method suitable to export data from Qlik sense mashup for Qlik sense anonymous user?

I tried to use your method, there is error in the console. Could you please be more specific about your method?

Thanks!

eric_careta
Partner
Partner

Does anybody get solution for this issue? I have the same trouble :S

Thankyou

gabineaq
Partner
Partner

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);

});

sushilpandeyjee
Contributor
Contributor

This code is not running. I am using 3.1 version. Could you please suggest