Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

New Contributor III

How to export data on qliksense mashup

Hi all,pls tell me how to export data on qliksense mashup,can not be exported by clicking the right mouse button or with an extension without any restrictions,thank you!

1 Reply

Re: How to export data on qliksense mashup

Hi Junzai,

The code I will display is not the complete code but I will try to guide you through the example.

This is how I have solved it:

In the .js file I have the following function and this is being called everytime a user right-click on a container with the class "right-click-toolbar". Right-clicking on this container brings up a modal with some options. One of the option is the export data link:

$( ".right-click-toolbar" ).contextmenu(function(event) {


    var containerID = $(this).find("[data-qvobject]").attr('id');


    var qlikObjects = setObjects.toString();

    if(qlikObjects.indexOf(containerID) != -1){

        var tmpString = qlikObjects.substr(qlikObjects.indexOf(containerID), qlikObjects.length);

        var ptrn = /(\d+|\w+|-_)/g;

        var match, qlikID;

        var test = ptrn.exec(tmpString);

        if((match = ptrn.exec(tmpString)) != null){

            qlikID = match[0];



    $( ".export-data-link" ).attr({

        'qvdata-id': qlikID



So what we do here is to find the id of the container that has the QV-object and attach that ID to the export link.

Next part of the the .js-file handles when the user clicks the export button:

$( ".export-data-link" ).click(function(event) {


    var qlikID = $(this).attr("qvdata-id");



var exportObject = function(qvObj){

      app.getObject("export-container", qvObj).then(function(retObj){

          retObj.exportData( 'OOXML', '/qHyperCubeDef').then(function(c){

              var d = "../.." + c.qUrl;


                  'filename': "download",

                'download': true,

                'href': d





The HTML looks like this:

<div class="right-click-toolbar">

    <div id="QV01" class="qvobject" data-qvobject=""></div>


I have removed a lot of code so it might be so that this will not work as it is since I haven't tested it completely. Let me know if you have any issues.

Community Browser