
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- « Previous Replies
- Next Replies »
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
here's an example how you could do that. This functionality is currently not documented nor supported, but in the next version of Qlik Sense it will be there:
Html:
<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>
JavaScript:
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);
});
})
});
} );

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Teena,
Have a look at the Engine API. In particular, this link here: http://help.qlik.com/sense/en-us/developer/#../Subsystems/EngineAPI/Content/WorkingWithAppsAndVisual...
Basically, you can create a hypercube (potentially hook into the hypercube of the object) and export the data from there.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jeffrey,
Can you make an example? It will be great to share it.
aiham

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jeffrey,
Can you please provide an example for mashup content here? We need this feature to make mashups more useful.
Ramendra


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
here's an example how you could do that. This functionality is currently not documented nor supported, but in the next version of Qlik Sense it will be there:
Html:
<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>
JavaScript:
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);
});
})
});
} );

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please what is vizModel?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is the model of the visualization object.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, thanks. I tried to follow your example, but it didn't work. Please what am I doing wrong?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As mentioned before, the above illustrated solution is not officially supported.
Starting with Qlik Sense 2.1 (which will be available soon) a new Client API will be available the so called "Table API" which then allows export of data:
var qTable = qlik.table(this);
var $exportButton = $( document.createElement('button'));
$exportButton.html('Export');
$exportButton.bind('click', function ( ) {
qTable.exportData({download: true});
});
$element.append($exportButton);
More about the Table API will then be available in the official documentation of Qlik Sense 2.1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, now I understand you, so it can't work yet until version 2.1? We will wait till then. However am I on the right path from the code I posted.

- « Previous Replies
- Next Replies »